Logback confusion

84 views
Skip to first unread message

Torsten Uhlmann

unread,
Apr 22, 2013, 3:39:00 AM4/22/13
to lif...@googlegroups.com
I'm a bit confused about using Logback in my current app and would like your input.

I'm using logback-classic 1.0.6 in a Lift 2.5-RC5 application which runs in production on a Tomcat 7.0.26 server on Ubuntu 12.04.
Until yesterday I put a "production.default.logback.xml" as well as a "default.logback.xml" file inside src/main/resources/props - and that worked fine.
I didn't see any logback-specific messages in catalina.out (like which file was parsed, which appenders instantiated, etc), but the files were there and logging worked.
Then yesterday or the day before that it suddenly stopped and I can't seem to figure out why. So, in production the log files are simply not created. In development mode it works fine, and when I run locally with production mode it also works fine.

The thing that helped was putting a "logback.xml" file into src/main/resources (not props). That thing is parsed (I see Logback specific messages in the console or catalina.out) and logfiles are created and function properly.

However I have no idea why the Lift specific naming scheme did stop working on the production machine. 

Did anyone else encounter a similar thing before?

Thanks,
Torsten.

Diego Medina

unread,
Apr 22, 2013, 7:10:40 AM4/22/13
to Lift
I encountered that same issue a while ago, and the culprit was adding
lift-shiro to my application.
> --
> --
> Lift, the simply functional web framework: http://liftweb.net
> Code: http://github.com/lift
> Discussion: http://groups.google.com/group/liftweb
> Stuck? Help us help you:
> https://www.assembla.com/wiki/show/liftweb/Posting_example_code
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to liftweb+u...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--
Diego Medina
Lift/Scala Developer
di...@fmpwizard.com
http://fmpwizard.telegr.am

Jeppe Nejsum Madsen

unread,
Apr 22, 2013, 7:11:44 AM4/22/13
to lif...@googlegroups.com
On Mon, Apr 22, 2013 at 9:39 AM, Torsten Uhlmann <torsten...@gmail.com> wrote:
I'm a bit confused about using Logback in my current app and would like your input.

I'm using logback-classic 1.0.6 in a Lift 2.5-RC5 application which runs in production on a Tomcat 7.0.26 server on Ubuntu 12.04.
Until yesterday I put a "production.default.logback.xml" as well as a "default.logback.xml" file inside src/main/resources/props - and that worked fine.
I didn't see any logback-specific messages in catalina.out (like which file was parsed, which appenders instantiated, etc), but the files were there and logging worked.
Then yesterday or the day before that it suddenly stopped and I can't seem to figure out why. So, in production the log files are simply not created. In development mode it works fine, and when I run locally with production mode it also works fine.

Did anything change? New versions (of lift, dependencies, tomcat etc), code changes?
 
The thing that helped was putting a "logback.xml" file into src/main/resources (not props). That thing is parsed (I see Logback specific messages in the console or catalina.out) and logfiles are created and function properly.

This is the default file used by logback file, if it's not configured.
 
However I have no idea why the Lift specific naming scheme did stop working on the production machine. 

Did anyone else encounter a similar thing before?


I think Diego mentioned this some time ago also, and I seem to recall others have had troubles as well.

You could have a look at LoggingAutoConfigurer and try to recreate the steps it's taking to configure logback and see if you can figure out where it fails.

/Jeppe

Torsten Uhlmann

unread,
Apr 22, 2013, 7:29:06 AM4/22/13
to lif...@googlegroups.com
Thanks Jeppe and Diego!

Indeed, the project uses Shiro since the beginning. Also, a few things have changes, but nothing of these changes 2 days ago:

- I switched to Scala 2.10 and Lift 2.5-RC5 about a week or more ago. At this point I created a 2.10 built of Shiro available from my github repo (anyone needs it?)
- I updated the Ubuntu server on April 13th to Tomcat 7.0.26
- I also changed the Logback file to change the TimeBased file rolling from hourly based to day based (removing "-HH in the pattern"). That was actually when the system broke. I reverted the changed file to the previous committed version but it still didn't come back to live.

Of course, since computers are deterministic most of the time I must have changed something, I just can't figure out what… :)

Anyway, I'll search the archive for Diegos posts concerning Shiro.

Thanks,
Torsten.

Austen Holmes

unread,
Apr 26, 2013, 1:32:22 PM4/26/13
to lif...@googlegroups.com
What's your github repo URL?  I was about to start building lift-shiro 2.10, but since someone has done it already.... :-)

Torsten Uhlmann

unread,
Apr 26, 2013, 1:35:16 PM4/26/13
to lif...@googlegroups.com
Hi Austen,


Torsten.

-- 
AGYNAMIX(R). Passionate Software.
Inh. Torsten Uhlmann | Buchenweg 5 | 09380 Thalheim
Phone:       +49 3721 273445
Fax:             +49 3721 273446
Mobile:       +49 151 12412427
Web:           http://www.agynamix.de
Reply all
Reply to author
Forward
0 new messages