Hi Charlie,

>-----Original Message-----
>From: Charlie Garrison [mailto:[email protected]]
>Sent: 22 April 2013 17:56
>To: The elegant MVC web framework
>Subject: RE: [Catalyst] Populate Log4perl config from Catalyst
>perl hooks
>
>Good morning,
>
>On 22/04/13 at 3:57 PM -0000, Anthony Gladdish
><[email protected]> wrote:
>
>>It's turned on by default, yet enabling/disabling it before
>>initialising the new log object, doesn't appear to fix:
>
>I don't know what else to suggest. This is an (slightly
>modified) example that works for us:
>
>log4perl.appender.CLIENTLOG.filename=sub { require MyApp;
>return
>MyApp->path_to('client.log'); }

This has worked, thanks for your help.

I changed:

        log4perl.appender.LOGFILE.layout.ConversionPattern=\sub { return 
MyApp::Cat::my_test_hook(); }

to:

        log4perl.appender.LOGFILE.layout.ConversionPattern=sub { return 
MyApp::Cat->my_test_hook(); }

... removing the "\" and converting "::" to "->".

The documentation says to use "\sub" - not sure if this is an issue with their 
documentation. I'll get in contact with the author.

Many thanks,
Ant.
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to