FAQ
Is there a way to get all of the logging that you get with the dev
catalyst server when you use Catalyst::Log::Log4perl? I love me my l4p
formatting, including lline numbers, etc., but would also like to see
the standard catalyst debug output.

I"ve enabled l4p in catalyst liek this:

# In my app main class
use Catalyst::Log::Log4perl;

# and

__PACKAGE__->log(
Catalyst::Log::Log4perl->new(
'/home/eberg/.log4perl.conf',
)
);

and what I'm NOT seeing is this type of output:

[info] *** Request 1 (0.022/s) [14691] [Sun Jan 23 15:56:08 2011] ***
[debug] "GET" request for "/" from "192.168.0.2"
[debug] Path is "/"
[debug] Found sessionid "047f0a6876ad155397f81716a7e9642f05594914" in cookie
[debug] Restored session "047f0a6876ad155397f81716a7e9642f05594914"
[debug] END
[debug] Rendering template "index.tt2"
[debug] Response Code: 200; Content-Type: text/html; charset=utf-8; Content-Length: 8017
[info] Request took 0.160021s (6.249/s)
.------------------------------------------------------------+-----------.
Action | Time |
+------------------------------------------------------------+-----------+
/auto | 0.000545s |
/default | 0.000253s |
/end | 0.116628s |
-> GLR::View::HTML->process | 0.113000s |
'------------------------------------------------------------+-----------'

Any help will be appreciated.

Eric

Search Discussions

  • Rippl, Steve at Jan 24, 2011 at 1:10 am

    On Sun, Jan 23, 2011 at 4:49 PM, Eric Berg wrote:
    Is there a way to get all of the logging that you get with the dev catalyst server when you use Catalyst::Log::Log4perl? ?I love me my l4p formatting, including lline numbers, etc., but would also like to see the standard catalyst debug output.

    I"ve enabled l4p in catalyst liek this:

    # In my app main class
    use Catalyst::Log::Log4perl;

    # and

    __PACKAGE__->log(
    ? ? Catalyst::Log::Log4perl->new(
    ? ? ? ? '/home/eberg/.log4perl.conf',
    ? ? )
    ?);
    I have the same as above in myapp.pm, then in log4perl.conf on the dev
    server I have

    log4perl.logger = DEBUG, Screen
    log4perl.logger.Catalyst.Plugin.Authorization.ACL = INFO, Screen

    log4perl.appender.Screen =
    Log::Log4perl::Appender::ScreenColoredLevels
    log4perl.appender.Screen.stderr = 1
    log4perl.appender.Screen.layout =
    Log::Log4perl::Layout::PatternLayout
    log4perl.appender.Screen.layout.ConversionPattern = [%p] %m%n
    log4perl.appender.Screen.color.ERROR = bold underline red on_white
    log4perl.appender.Screen.color.DEBUG = blue
    log4perl.appender.Screen.color.WARN = magenta

    and I get all the usual Catalyst debug output (in color!)


    --
    Steve Rippl
    Technology Director
    Woodland Public Schools
    360 841 2730
  • Eric Berg at Jan 24, 2011 at 2:21 am
    That did it, Steve. Another oversight on my part...I had the

    log4perl.appender.Screen.layout

    line wrong.

    Thanks.

    Eric
    On 1/23/11 8:10 PM, Rippl, Steve wrote:
    log4perl.logger = DEBUG, Screen
    log4perl.logger.Catalyst.Plugin.Authorization.ACL = INFO, Screen

    log4perl.appender.Screen = Log::Log4perl::Appender::ScreenColoredLevels
    log4perl.appender.Screen.stderr = 1
    log4perl.appender.Screen.layout = Log::Log4perl::Layout::PatternLayout
    log4perl.appender.Screen.layout.ConversionPattern = [%p] %m%n
    log4perl.appender.Screen.color.ERROR = bold underline red on_white
    log4perl.appender.Screen.color.DEBUG = blue
    log4perl.appender.Screen.color.WARN = magenta

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedJan 24, '11 at 12:49a
activeJan 24, '11 at 2:21a
posts3
users2
websitecatalystframework.org
irc#catalyst

2 users in discussion

Eric Berg: 2 posts Rippl, Steve: 1 post

People

Translate

site design / logo © 2022 Grokbase