[Lift] Re: problems logging

2009-05-19 Thread Channing Walton



On May 18, 11:52 pm, sailormoo...@gmail.com sailormoo...@gmail.com
wrote:
 I think in your exception handler only Production is defined.
 Are you running on Production Mode?

Aha, I don't think I am. I just use RunWebApp. I'll look into that
thanks.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: problems logging

2009-05-19 Thread Derek Chen-Becker
If you want the exception handling in all modes, just change your code to

case (_, Req(path, , GetRequest), exception)

The _ acts as a wildcard for the mode.

Derek

On Tue, May 19, 2009 at 5:12 AM, Channing Walton channingwal...@mac.comwrote:




 On May 18, 11:52 pm, sailormoo...@gmail.com sailormoo...@gmail.com
 wrote:
  I think in your exception handler only Production is defined.
  Are you running on Production Mode?

 Aha, I don't think I am. I just use RunWebApp. I'll look into that
 thanks.

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: problems logging

2009-05-19 Thread Martin Ellis

 On May 17, 10:33 pm, Timothy Perrett timo...@getintheloop.eu wrote:
 Can you verify the log4j.xml file is being read?


On Mon, May 18, 2009 at 9:38 PM, Channing Walton channingwal...@mac.com wrote:
 Not sure how I can tell.

Specifying -Dlog4j.debug on the command line should prompt log4j to tell you
what it's doing.

Martin

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: problems logging

2009-05-18 Thread Channing Walton



On May 17, 10:33 pm, Timothy Perrett timo...@getintheloop.eu wrote:
 Can you verify the log4j.xml file is being read?


Not sure how I can tell.

 The JPA example here changes the logging environment so perhaps use it
 as an example to get started :) Grab it here:http://is.gd/AMAW

Thanks, I tried that but still nothing.

I think I will try it on a fresh lift project to make sure it isn't
something odd with my set up.

Channing

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: problems logging

2009-05-17 Thread Timothy Perrett

Can you verify the log4j.xml file is being read?

The JPA example here changes the logging environment so perhaps use it
as an example to get started :) Grab it here: http://is.gd/AMAW

HTH

Cheers, Tim

On May 17, 9:57 pm, Channing Walton channingwal...@mac.com wrote:
 Hi,
 I am having trouble logging anything in my app, no logs are appearing
 anywhere.

 I have the following in Boot:

   DB.addLogFunc((query, len) = Log.error(The query: +query+
 took+len+ milliseconds))

     LiftRules.exceptionHandler.prepend {
       case (Props.RunModes.Production, Req(path, , GetRequest),
 exception) = {
         Log.error(MELT DOWN!!, exception)
         RedirectResponse(/)
       }
     }

 and a default.log4j.xml

 log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/;
   appender name=console class=org.apache.log4j.ConsoleAppender
     param name=Target value=System.out/
     layout class=org.apache.log4j.PatternLayout
       param name=ConversionPattern value=%-5p %c{1} - %m%n/
     /layout
   /appender

   root
     priority value =debug /
     appender-ref ref=console /
   /root

 /log4j:configuration

 what am I missing?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---