Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Users

Log::Dispatch::Output::log Missing mandatory parameters

 

 

Catalyst users RSS feed   Index | Next | Previous | View Threaded


clrrsnd at gmail

Oct 14, 2011, 7:30 AM

Post #1 of 7 (399 views)
Permalink
Log::Dispatch::Output::log Missing mandatory parameters

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


bobtfish at bobtfish

Oct 21, 2011, 11:39 AM

Post #2 of 7 (353 views)
Permalink
Re: Log::Dispatch::Output::log Missing mandatory parameters [In reply to]

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

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


cylontoaster at gmx

Oct 24, 2011, 2:43 AM

Post #3 of 7 (364 views)
Permalink
Re: Log::Dispatch::Output::log Missing mandatory parameters [In reply to]

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 [at] lists
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
> Dev site: http://dev.catalyst.perl.org/


clrrsnd at gmail

Oct 24, 2011, 4:59 AM

Post #4 of 7 (364 views)
Permalink
Re: Log::Dispatch::Output::log Missing mandatory parameters [In reply to]

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 <cylontoaster [at] gmx> 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 [at] lists
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
> Dev site: http://dev.catalyst.perl.org/
>
>
>
> _______________________________________________
> List: Catalyst [at] lists
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst [at] lists/
> Dev site: http://dev.catalyst.perl.org/
>
>


cylontoaster at gmx

Oct 24, 2011, 7:11 AM

Post #5 of 7 (361 views)
Permalink
Re: Log::Dispatch::Output::log Missing mandatory parameters [In reply to]

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 <cylontoaster [at] gmx
> <mailto:cylontoaster [at] gmx>> 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 [at] lists <mailto:Catalyst [at] lists>
>> Listinfo:http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
>> Searchable archive:http://www.mail-archive.com/catalyst [at] lists/
>> Dev site:http://dev.catalyst.perl.org/
>
>
> _______________________________________________
> List: Catalyst [at] lists <mailto:Catalyst [at] lists>
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst [at] lists/
> Dev site: http://dev.catalyst.perl.org/
>
>
>
>
> _______________________________________________
> List: Catalyst [at] lists
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
> Dev site: http://dev.catalyst.perl.org/


billcrawford1970 at gmail

Oct 25, 2011, 2:45 AM

Post #6 of 7 (351 views)
Permalink
Re: Log::Dispatch::Output::log Missing mandatory parameters [In reply to]

On 24 October 2011 12:59, clara resende <clrrsnd [at] gmail> wrote:

> log4perl.rootLogger=DEBUG, 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?

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


cylontoaster at gmx

Oct 25, 2011, 3:03 AM

Post #7 of 7 (378 views)
Permalink
Re: Log::Dispatch::Output::log Missing mandatory parameters [In reply to]

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=FATAL

# EMAIL
log4perl.appender.EMAIL=Log::Dispatch::Email::MailSend
log4perl.appender.EMAIL.from=aaa [at] bbb
log4perl.appender.EMAIL.to=stephan [at] lrz
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=FATAL
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






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

Catalyst users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.