FAQ
Hi all,

I just upgraded to Catalyst 5.9 and I was getting messages about
Catalyst::Log::Log4perl being deprecated so I changed to
Log::Log4perl::Catalyst.

But now I am getting:

$ script/webservices_server.pl -r
Couldn't load class (myapp) because: Mandatory parameters 'level', 'message'
missing in call to Log::Dispatch::Output::log
at /usr/lib/perl5/site_perl/5.8.8/Params/ValidatePP.pm line 650
Params::Validate::__ANON__('Mandatory parameters \'level\', \'message\'
missing in call t...') called at
/usr/lib/perl5/site_perl/5.8.8/Params/ValidatePP.pm line 362


How to fix that?

Thanks,

Meindert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20111014/01a4ca25/attachment.htm

Search Discussions

  • Tomas Doran at Oct 21, 2011 at 6:39 pm

    On 14 Oct 2011, at 07:30, clara resende wrote:
    How to fix that?
    No idea as you haven't shown us any of your code. This isn't an error
    I've seen before, so one would assume it's something to do with your
    logging configuration.. :)

    Cheers
    t0m
  • Cylontoaster at Oct 25, 2011 at 10:03 am
    Hello,
    No idea as you haven't shown us any of your code. This isn't an error
    I've seen before, so one would assume it's something to do with your
    logging configuration.. :)
    presumably u are right, so here's an extract of my configuration. below
    are 2 configuration-examples using Threshold and using filter.
    both of them throw the exception:

    Couldn't load class (...) because: Mandatory parameters 'level',
    'message' missing in call to Log::Dispatch::Output::log



    + using threshold


    log4perl.category = DEBUG, FILE, SCREEN, EMAIL

    # 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

    # FILE
    log4perl.appender.FILE = Log::Dispatch::FileRotate
    log4perl.appender.FILE.mode = append
    log4perl.appender.FILE.max = 100
    log4perl.appender.FILE.size = 10_000_000 # 10MB
    log4perl.appender.FILE.filename = log/dw.log
    log4perl.appender.FILE.layout = PatternLayout
    log4perl.appender.FILE.layout.ConversionPattern = [%p] %d %F %L %c - %m%n
    # below doesn't work :-(
    log4perl.appender.FILE.stderr=0
    log4perl.appender.FILE.ThresholdúTAL

    # EMAIL
    log4perl.appender.EMAIL=Log::Dispatch::Email::MailSend
    log4perl.appender.EMAIL.fromªa@bbb.com
    log4perl.appender.EMAIL.to=stephan@lrz.de
    log4perl.appender.EMAIL.subject=An Error occured
    log4perl.appender.EMAIL.layout=PatternLayout
    log4perl.appender.EMAIL.layout.ConversionPattern=%d %F %L %c - %m%n
    log4perl.appender.EMAIL.ThresholdúTAL
    log4perl.appender.EMAIL.buffered=0






    + Here's a try using a filter:

    log4perl.category = DEBUG, ERRORFILE

    # Filter to match level ERROR
    log4perl.filter.MatchError = Log::Log4perl::Filter::LevelMatch
    log4perl.filter.MatchError.LevelToMatch = ERROR
    log4perl.filter.MatchError.AcceptOnMatch = true


    # FILE
    log4perl.appender.FILE = Log::Dispatch::FileRotate
    log4perl.appender.FILE.mode = append
    log4perl.appender.FILE.max = 100
    log4perl.appender.FILE.size = 10000000
    log4perl.appender.FILE.filename = log/dw_error.log
    log4perl.appender.FILE.layout = PatternLayout
    log4perl.appender.FILE.layout.ConversionPattern = [%p] %d %F %L %c - %m%n
    log4perl.appender.FILE.Filter = MatchError



    tu,
    andy
  • Cylontoaster at Oct 24, 2011 at 9:43 am
    Hello,
    have you already found a solution???
    thanx,
    andy
    Hi all,

    I just upgraded to Catalyst 5.9 and I was getting messages about
    Catalyst::Log::Log4perl being deprecated so I changed to
    Log::Log4perl::Catalyst.

    But now I am getting:

    $ script/webservices_server.pl <http://webservices_server.pl> -r
    Couldn't load class (myapp) because: Mandatory parameters 'level',
    'message' missing in call to Log::Dispatch::Output::log
    at /usr/lib/perl5/site_perl/5.8.8/Params/ValidatePP.pm line 650
    Params::Validate::__ANON__('Mandatory parameters \'level\',
    \'message\' missing in call t...') called at
    /usr/lib/perl5/site_perl/5.8.8/Params/ValidatePP.pm line 362


    How to fix that?

    Thanks,

    Meindert


    _______________________________________________
    List: Catalyst@lists.scsys.co.uk
    Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
    Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
    Dev site: http://dev.catalyst.perl.org/
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20111024/7a60fa1c/attachment.htm
  • Clara resende at Oct 24, 2011 at 11:59 am
    I haven't looked at it in depth but in my configuration file something
    seemed to go wrong setting the level:

    log4perl.rootLogger=DEBUG, Screen, Logfile
    log4perl.appender.Screen=Log::Dispatch::Screen
    log4perl.appender.Screen.Threshold=WARN

    This was ok before but after the update it gave me the error. Commenting out
    the line

    log4perl.appender.Screen.Threshold=WARN

    and the error is gone.

    On Mon, Oct 24, 2011 at 11:43 AM, cylontoaster wrote:

    Hello,
    have you already found a solution???
    thanx,
    andy

    Hi all,

    I just upgraded to Catalyst 5.9 and I was getting messages about
    Catalyst::Log::Log4perl being deprecated so I changed to
    Log::Log4perl::Catalyst.

    But now I am getting:

    $ script/webservices_server.pl -r
    Couldn't load class (myapp) because: Mandatory parameters 'level',
    'message' missing in call to Log::Dispatch::Output::log
    at /usr/lib/perl5/site_perl/5.8.8/Params/ValidatePP.pm line 650
    Params::Validate::__ANON__('Mandatory parameters \'level\', \'message\'
    missing in call t...') called at
    /usr/lib/perl5/site_perl/5.8.8/Params/ValidatePP.pm line 362


    How to fix that?

    Thanks,

    Meindert


    _______________________________________________
    List: Catalyst@lists.scsys.co.uk
    Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
    Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
    Dev site: http://dev.catalyst.perl.org/



    _______________________________________________
    List: Catalyst@lists.scsys.co.uk
    Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
    Searchable archive:
    http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
    Dev site: http://dev.catalyst.perl.org/
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20111024/33c58288/attachment.htm
  • Cylontoaster at Oct 24, 2011 at 2:11 pm
    thank u for your reply,
    I can confirm this behavior, but regarding this, it's not possible
    anymore to log a certain level i.e. in SCREEN and another one in FILE.
    Also the usage of filters react by throwing the same error-message :-(
    I haven't looked at it in depth but in my configuration file something
    seemed to go wrong setting the level:

    log4perl.rootLogger=DEBUG, Screen, Logfile
    log4perl.appender.Screen=Log::Dispatch::Screen
    log4perl.appender.Screen.Threshold=WARN

    This was ok before but after the update it gave me the error.
    Commenting out the line

    log4perl.appender.Screen.Threshold=WARN

    and the error is gone.


    On Mon, Oct 24, 2011 at 11:43 AM, cylontoaster wrote:

    Hello,
    have you already found a solution???
    thanx,
    andy
    Hi all,

    I just upgraded to Catalyst 5.9 and I was getting messages about
    Catalyst::Log::Log4perl being deprecated so I changed to
    Log::Log4perl::Catalyst.

    But now I am getting:

    $ script/webservices_server.pl <http://webservices_server.pl> -r
    Couldn't load class (myapp) because: Mandatory parameters
    'level', 'message' missing in call to Log::Dispatch::Output::log
    at /usr/lib/perl5/site_perl/5.8.8/Params/ValidatePP.pm line 650
    Params::Validate::__ANON__('Mandatory parameters \'level\',
    \'message\' missing in call t...') called at
    /usr/lib/perl5/site_perl/5.8.8/Params/ValidatePP.pm line 362


    How to fix that?

    Thanks,

    Meindert


    _______________________________________________
    List:Catalyst@lists.scsys.co.uk > Listinfo:http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
    Searchable archive:http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
    Dev site:http://dev.catalyst.perl.org/

    _______________________________________________
    List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
    Searchable archive:
    http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
    Dev site: http://dev.catalyst.perl.org/




    _______________________________________________
    List: Catalyst@lists.scsys.co.uk
    Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
    Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
    Dev site: http://dev.catalyst.perl.org/
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20111024/211132a9/attachment.htm
  • Will Crawford at Oct 25, 2011 at 9:45 am

    On 24 October 2011 12:59, clara resende wrote:

    log4perl.rootLoggerÞBUG, Screen, Logfile
    log4perl.appender.Screen=Log::Dispatch::Screen
    log4perl.appender.Screen.Threshold=WARN
    From the example in the L::L4P::C man page:
    The logging statement can be suppressed or activated based on a
    Log4perl file that
    looks like

    # All MyApp loggers opened up for DEBUG and above
    log4perl.logger.MyApp = DEBUG, Screen
    # ...

    or

    # All loggers block messages below INFO
    log4perl.logger=INFO, Screen
    # ...

    Looks like you need to put the Screen and WARN in one line?

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedOct 14, '11 at 2:30p
activeOct 25, '11 at 10:03a
posts7
users4
websitecatalystframework.org
irc#catalyst

People

Translate

site design / logo © 2021 Grokbase