You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
(38) |
Sep
(126) |
Oct
(23) |
Nov
(72) |
Dec
(36) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(76) |
Feb
(32) |
Mar
(19) |
Apr
(6) |
May
(54) |
Jun
(40) |
Jul
(45) |
Aug
(35) |
Sep
(51) |
Oct
(67) |
Nov
(10) |
Dec
(50) |
2004 |
Jan
(51) |
Feb
(22) |
Mar
(22) |
Apr
(28) |
May
(53) |
Jun
(99) |
Jul
(38) |
Aug
(49) |
Sep
(23) |
Oct
(29) |
Nov
(30) |
Dec
(48) |
2005 |
Jan
(15) |
Feb
(21) |
Mar
(25) |
Apr
(16) |
May
(131) |
Jun
|
Jul
(8) |
Aug
(5) |
Sep
(15) |
Oct
|
Nov
(15) |
Dec
(12) |
2006 |
Jan
(15) |
Feb
(20) |
Mar
(8) |
Apr
(10) |
May
(3) |
Jun
(16) |
Jul
(15) |
Aug
(11) |
Sep
(17) |
Oct
(27) |
Nov
(11) |
Dec
(12) |
2007 |
Jan
(19) |
Feb
(18) |
Mar
(33) |
Apr
(4) |
May
(15) |
Jun
(22) |
Jul
(19) |
Aug
(20) |
Sep
(14) |
Oct
(4) |
Nov
(34) |
Dec
(11) |
2008 |
Jan
(8) |
Feb
(18) |
Mar
(2) |
Apr
(4) |
May
(26) |
Jun
(9) |
Jul
(8) |
Aug
(8) |
Sep
(3) |
Oct
(17) |
Nov
(14) |
Dec
(4) |
2009 |
Jan
(6) |
Feb
(41) |
Mar
(21) |
Apr
(10) |
May
(21) |
Jun
|
Jul
(8) |
Aug
(4) |
Sep
(3) |
Oct
(8) |
Nov
(6) |
Dec
(5) |
2010 |
Jan
(14) |
Feb
(13) |
Mar
(7) |
Apr
(12) |
May
(4) |
Jun
(1) |
Jul
(11) |
Aug
(5) |
Sep
|
Oct
(1) |
Nov
(10) |
Dec
|
2011 |
Jan
(7) |
Feb
(3) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(1) |
Jul
(6) |
Aug
(6) |
Sep
(10) |
Oct
(5) |
Nov
(4) |
Dec
(5) |
2012 |
Jan
(4) |
Feb
(5) |
Mar
(1) |
Apr
(7) |
May
(1) |
Jun
|
Jul
(2) |
Aug
|
Sep
(5) |
Oct
(5) |
Nov
(4) |
Dec
(5) |
2013 |
Jan
(6) |
Feb
|
Mar
(14) |
Apr
(9) |
May
(3) |
Jun
(2) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
(4) |
Dec
(6) |
2014 |
Jan
|
Feb
(1) |
Mar
(10) |
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
(4) |
Oct
(1) |
Nov
|
Dec
(4) |
2015 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
From: Mike S. <m...@pe...> - 2013-04-11 06:59:12
|
On Wed, 10 Apr 2013, Jochen Hayek wrote: > The article moved to: http://logging.apache.org/log4j/1.2/manual.html Thanks, I've fixed it: https://github.com/mschilli/log4perl/commit/6f5438e7ff8d4a2475257fdf26984c7c3dc3eca9 > There are also a few links on http://mschilli.github.io/log4perl/ > , that need an update: Fixed also: https://github.com/mschilli/log4perl/commit/d863b2c8c3dbce1924ccfb9e78c98f0856b228c5 Thanks for pointing this out. -- -- Mike Mike Schilli m...@pe... > > Again Ceki Gülcü's "Short introduction to log4j", > and if you want to link to Apache logging services, you may better > list a larger selection: > * http://logging.apache.org/ > * http://logging.apache.org/log4j/1.2/ (log4j home page, the > "original" approach) > * http://logging.apache.org/log4j/2.x/ (log4j home page, the "new > generation" approach) > > > Kind regards, > JH > > http://www.LinkedIn.com/in/JochenHayek > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > log4perl-devel mailing list > log...@li... > https://lists.sourceforge.net/lists/listinfo/log4perl-devel |
From: Jochen H. <Joc...@Ha...> - 2013-04-10 08:47:01
|
Hi, there, in the manual page for Log::Log4perl there is a link to the article by Ceki Gülcü "Short introduction to log4j". The article moved to: http://logging.apache.org/log4j/1.2/manual.html There are also a few links on http://mschilli.github.io/log4perl/ , that need an update: Again Ceki Gülcü's "Short introduction to log4j", and if you want to link to Apache logging services, you may better list a larger selection: * http://logging.apache.org/ * http://logging.apache.org/log4j/1.2/ (log4j home page, the "original" approach) * http://logging.apache.org/log4j/2.x/ (log4j home page, the "new generation" approach) Kind regards, JH http://www.LinkedIn.com/in/JochenHayek |
From: Lee <le...@gm...> - 2013-03-28 10:17:29
|
On 28/03/2013 03:56, Mike Schilli wrote: > On Wed, 27 Mar 2013, Lee Goddard wrote: > >> I'm trying Log::Log4perl::Catalyst in the way described in the SYNOPSIS >> of the POD, with the configuration below. I get my own log statements in >> the expected location but still some of Catalyst's -Debug statements go >> to STDERR. > If those messages aren't formatted with the Log4perl layout you've > specified, it's safe to assume that they're not using Log4perl for > those. > > You might want to ask on the Catalyst forums, I've had good luck with > speedy responses in the Freenode #catalyst IRC channel. Thanks, will do. Lee |
From: Mike S. <m...@pe...> - 2013-03-28 02:56:58
|
On Wed, 27 Mar 2013, Lee Goddard wrote: > I'm trying Log::Log4perl::Catalyst in the way described in the SYNOPSIS > of the POD, with the configuration below. I get my own log statements in > the expected location but still some of Catalyst's -Debug statements go > to STDERR. If those messages aren't formatted with the Log4perl layout you've specified, it's safe to assume that they're not using Log4perl for those. You might want to ask on the Catalyst forums, I've had good luck with speedy responses in the Freenode #catalyst IRC channel. -- -- Mike Mike Schilli m...@pe... > > Is this a feature of Catalyst, or am I doing something wrong? > > TIA > Lee > > Config: > > log4perl.logger = TRACE, FILE > log4perl.appender.FILE = Log::Log4perl::Appender::File > log4perl.appender.FILE.mode = append > log4perl.appender.FILE.filename = > /logs/engine/FifteenGifts-Engine/logs/l4p.log > log4perl.appender.FILE.layout=Log::Log4perl::Layout::PatternLayout > log4perl.appender.FILE.layout.ConversionPattern = %5p | %-50m | %-30M{4} > %4L%n > > Output in l4p.log: > > TRACE | Leave | > Engine.Model.DAO.retrieve 135 > DEBUG | Response Code: 200; Content-Type: application/json; > charset=utf-8; Content-Length: 13587 | > Catalyst::log_response_status_line 2264 > INFO | Request took 26.607410s (0.038/s) > .------------------------------------------------------------+-----------. > | Action | Time | > +------------------------------------------------------------+-----------+ > | /threshold/default | 26.59772s | > | -> /threshold/update | 26.59430s | > | /end | 0.002213s | > | -> FifteenGifts::Engine::View::JSON->process | 0.001421s | > '------------------------------------------------------------+-----------' > > | Catalyst::finalize 1820 > > > > Output in error_log (STDERR) > > [Wed Mar 27 09:42:13 2013] [error] [client 127.0.0.1] [debug] Loaded > Path actions:, referer: http://engineeditor/threshold/ > [Wed Mar 27 09:42:13 2013] [error] [client 127.0.0.1] [info] > FifteenGifts::Engine powered by Catalyst 5.90019, referer: > http://engineeditor/threshold/ > etc > : > > > > > ------------------------------------------------------------------------------ > Own the Future-Intel® Level Up Game Demo Contest 2013 > Rise to greatness in Intel's independent game demo contest. > Compete for recognition, cash, and the chance to get your game > on Steam. $5K grand prize plus 10 genre and skill prizes. > Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d > _______________________________________________ > log4perl-devel mailing list > log...@li... > https://lists.sourceforge.net/lists/listinfo/log4perl-devel > |
From: Lee G. <le...@gm...> - 2013-03-27 08:49:21
|
I'm trying Log::Log4perl::Catalyst in the way described in the SYNOPSIS of the POD, with the configuration below. I get my own log statements in the expected location but still some of Catalyst's -Debug statements go to STDERR. Is this a feature of Catalyst, or am I doing something wrong? TIA Lee Config: log4perl.logger = TRACE, FILE log4perl.appender.FILE = Log::Log4perl::Appender::File log4perl.appender.FILE.mode = append log4perl.appender.FILE.filename = /logs/engine/FifteenGifts-Engine/logs/l4p.log log4perl.appender.FILE.layout=Log::Log4perl::Layout::PatternLayout log4perl.appender.FILE.layout.ConversionPattern = %5p | %-50m | %-30M{4} %4L%n Output in l4p.log: TRACE | Leave | Engine.Model.DAO.retrieve 135 DEBUG | Response Code: 200; Content-Type: application/json; charset=utf-8; Content-Length: 13587 | Catalyst::log_response_status_line 2264 INFO | Request took 26.607410s (0.038/s) .------------------------------------------------------------+-----------. | Action | Time | +------------------------------------------------------------+-----------+ | /threshold/default | 26.59772s | | -> /threshold/update | 26.59430s | | /end | 0.002213s | | -> FifteenGifts::Engine::View::JSON->process | 0.001421s | '------------------------------------------------------------+-----------' | Catalyst::finalize 1820 Output in error_log (STDERR) [Wed Mar 27 09:42:13 2013] [error] [client 127.0.0.1] [debug] Loaded Path actions:, referer: http://engineeditor/threshold/ [Wed Mar 27 09:42:13 2013] [error] [client 127.0.0.1] [info] FifteenGifts::Engine powered by Catalyst 5.90019, referer: http://engineeditor/threshold/ etc : |
From: Mike S. <m...@pe...> - 2013-03-19 00:02:37
|
On Mon, 18 Mar 2013, Marc Zampetti wrote: > No, adding Log::Log4perl->reset() > before the second call to Log::log4perl->init() doesn't fix anything. So > far, the only solution is to remove one of the calls to > Log::Log4perl->init(). Do you have some code that reproduces the problem so I can take a look? -- -- Mike Mike Schilli m...@pe... > > Marc > > On Sun, Mar 17, 2013 at 8:32 PM, Mike Schilli <m...@pe...> wrote: > On Sat, 16 Mar 2013, Marc Zampetti wrote: > > So basically the question I have is that I need to > reset and > re-configure the logging system at some point after > the initial > logging setup. The docs for the init() and > init_once() methods suggest > that calling init() a second time will "reset" and > "overwrite" the > current configuration, which in this case I want. > > > Can you try if calling > > Log::Log4perl->reset() > > before calling init() the second time fixes the problem? > > -- -- Mike > > Mike Schilli > m...@pe... > > In the test suite, > I hope that helps. > > On Sat, Mar 16, 2013 at 4:08 AM, Lee <le...@gm...> > wrote: > I don't know the L4p source, but I vaguely recall > that > someone, years ago, possibly in the Log4perl docs, > said that > the init method was only intended to implement > initialisation, not re-initialisation. > > I may be wrong — I can't imagine ever calling init() > twice, > though I did occasionally do it when I first started > using > the system, there was some now-forgotten issue that > stopped > the practice. > > Why are you calling init twice? > > If it is just in case the config has chanced, there > is an > init-and-watch method. > > If it is to combine configurations, the Hash::Merge > module > can help, and there is a working example somewhere > in the > archives of this group. > > HTH > > On 15/03/2013 21:54, Marc Zampetti wrote: > I have a program that configures a basic Log4perl > config so that I have > some sane logging until I'm able to read in the > config > file with the > final configuration. I'm getting an error when > calling > Log::Log4perl->init() the second time that I cannot > seem to track down. > > From the reading of the docs, this is a valid use > case. Its a pretty > basic perl script, not using fork() or threads or > anything, and running > from the commandline, not mod_perl or something like > that. > > The error I get is: > > Can't call method "log" on an undefined value at > > /usr/lib/perl5/vendor_perl/5.8.8/Log/Log4perl/Appender.pm > line 189. > > This is generated when I do the second > Log::Log4perl->init(filename) > call. The first call to init passes in a string with > the basic > configuration. > > Anyone have any ideas what the issue might be? > > I'm running Log4perl-1.40, using Red Hat 5 64-bit. > > ----------------------------------------------------------------------- > ------- > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_mar > _______________________________________________ > log4perl-devel mailing list > log...@li... > https://lists.sourceforge.net/lists/listinfo/log4perl-devel > > > > > > > |
From: Marc Z. <mar...@gm...> - 2013-03-18 16:24:57
|
No, adding Log::Log4perl->reset() before the second call to Log::log4perl->init() doesn't fix anything. So far, the only solution is to remove one of the calls to Log::Log4perl->init(). Marc On Sun, Mar 17, 2013 at 8:32 PM, Mike Schilli <m...@pe...> wrote: > On Sat, 16 Mar 2013, Marc Zampetti wrote: > > So basically the question I have is that I need to reset and >> re-configure the logging system at some point after the initial >> logging setup. The docs for the init() and init_once() methods suggest >> that calling init() a second time will "reset" and "overwrite" the >> current configuration, which in this case I want. >> > > Can you try if calling > > Log::Log4perl->reset() > > before calling init() the second time fixes the problem? > > -- -- Mike > > Mike Schilli > m...@pe... > > In the test suite, >> I hope that helps. >> >> On Sat, Mar 16, 2013 at 4:08 AM, Lee <le...@gm...> wrote: >> I don't know the L4p source, but I vaguely recall that >> someone, years ago, possibly in the Log4perl docs, said that >> the init method was only intended to implement >> initialisation, not re-initialisation. >> >> I may be wrong — I can't imagine ever calling init() twice, >> though I did occasionally do it when I first started using >> the system, there was some now-forgotten issue that stopped >> the practice. >> >> Why are you calling init twice? >> >> If it is just in case the config has chanced, there is an >> init-and-watch method. >> >> If it is to combine configurations, the Hash::Merge module >> can help, and there is a working example somewhere in the >> archives of this group. >> >> HTH >> >> On 15/03/2013 21:54, Marc Zampetti wrote: >> I have a program that configures a basic Log4perl >> config so that I have >> some sane logging until I'm able to read in the config >> file with the >> final configuration. I'm getting an error when calling >> Log::Log4perl->init() the second time that I cannot >> seem to track down. >> >> From the reading of the docs, this is a valid use >> case. Its a pretty >> basic perl script, not using fork() or threads or >> anything, and running >> from the commandline, not mod_perl or something like >> that. >> >> The error I get is: >> >> Can't call method "log" on an undefined value at >> /usr/lib/perl5/vendor_perl/5.**8.8/Log/Log4perl/Appender.pm >> line 189. >> >> This is generated when I do the second >> Log::Log4perl->init(filename) >> call. The first call to init passes in a string with >> the basic >> configuration. >> >> Anyone have any ideas what the issue might be? >> >> I'm running Log4perl-1.40, using Red Hat 5 64-bit. >> >> ------------------------------**------------------------------** >> ----------- >> ------- >> Everyone hates slow websites. So do we. >> Make your web apps faster with AppDynamics >> Download AppDynamics Lite for free today: >> http://p.sf.net/sfu/appdyn_**d2d_mar <http://p.sf.net/sfu/appdyn_d2d_mar> >> ______________________________**_________________ >> log4perl-devel mailing list >> log4perl-devel@lists.**sourceforge.net<log...@li...> >> https://lists.sourceforge.net/**lists/listinfo/log4perl-devel<https://lists.sourceforge.net/lists/listinfo/log4perl-devel> >> >> >> >> >> |
From: Mike S. <m...@pe...> - 2013-03-18 00:47:49
|
On Fri, 15 Mar 2013, Dmitry Bigunyak wrote: > That brings me to the idea of having a chain of layout (in current > terminology) when you get an actual result passed through a number of > layouts and formatted in each of them accordingly. Have you looked at composite appenders yet? http://search.cpan.org/~mschilli/Log-Log4perl-1.40/lib/Log/Log4perl/Appender.pm#Composite_Appenders You can use a composite appender to preprocess the message and have it forwarded to the target appender right after. For the type of processing you have in mind, I've originally put warp_message in place, but I agree that the fact that it always produces an array ref isn't helpful. Maybe we need another preprocess hook for appenders in Log4perl. -- -- Mike Mike Schilli m...@pe... |
From: Mike S. <m...@pe...> - 2013-03-18 00:43:13
|
On Sat, 16 Mar 2013, Marc Zampetti wrote: > So basically the question I have is that I need to reset and > re-configure the logging system at some point after the initial > logging setup. The docs for the init() and init_once() methods suggest > that calling init() a second time will "reset" and "overwrite" the > current configuration, which in this case I want. Can you try if calling Log::Log4perl->reset() before calling init() the second time fixes the problem? -- -- Mike Mike Schilli m...@pe... > In the test suite, > > I hope that helps. > > On Sat, Mar 16, 2013 at 4:08 AM, Lee <le...@gm...> wrote: > I don't know the L4p source, but I vaguely recall that > someone, years ago, possibly in the Log4perl docs, said that > the init method was only intended to implement > initialisation, not re-initialisation. > > I may be wrong — I can't imagine ever calling init() twice, > though I did occasionally do it when I first started using > the system, there was some now-forgotten issue that stopped > the practice. > > Why are you calling init twice? > > If it is just in case the config has chanced, there is an > init-and-watch method. > > If it is to combine configurations, the Hash::Merge module > can help, and there is a working example somewhere in the > archives of this group. > > HTH > > On 15/03/2013 21:54, Marc Zampetti wrote: > I have a program that configures a basic Log4perl > config so that I have > some sane logging until I'm able to read in the config > file with the > final configuration. I'm getting an error when calling > Log::Log4perl->init() the second time that I cannot > seem to track down. > > From the reading of the docs, this is a valid use > case. Its a pretty > basic perl script, not using fork() or threads or > anything, and running > from the commandline, not mod_perl or something like > that. > > The error I get is: > > Can't call method "log" on an undefined value at > /usr/lib/perl5/vendor_perl/5.8.8/Log/Log4perl/Appender.pm > line 189. > > This is generated when I do the second > Log::Log4perl->init(filename) > call. The first call to init passes in a string with > the basic > configuration. > > Anyone have any ideas what the issue might be? > > I'm running Log4perl-1.40, using Red Hat 5 64-bit. > > ----------------------------------------------------------------------- > ------- > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_mar > _______________________________________________ > log4perl-devel mailing list > log...@li... > https://lists.sourceforge.net/lists/listinfo/log4perl-devel > > > > > |
From: Marc Z. <mar...@gm...> - 2013-03-16 18:19:34
|
The use case is the situation where I don't know what the config file with the logging configuration is yet. So basically, the program does the following: 1. Initializes the logging system as soon as it starts, before anything else, with a basic config that will log to stdout. 2. Process the command line parameters, does some other configuration work, which includes figuring out where the correct logging configuration file is. I need a valid logging system because there may be cases in this phase that log messages get generated, say for missing information or a filesystem permission issue, etc. 3. Calls init() with the new config file, to setup the real logging that should be done for the rest of the application. I cannot use the init_and_watch() method, because I don't have a config file to use yet. Not to mention, the init_and_watch has some performance issues. So basically the question I have is that I need to reset and re-configure the logging system at some point after the initial logging setup. The docs for the init() and init_once() methods suggest that calling init() a second time will "reset" and "overwrite" the current configuration, which in this case I want. I hope that helps. On Sat, Mar 16, 2013 at 4:08 AM, Lee <le...@gm...> wrote: > I don't know the L4p source, but I vaguely recall that someone, years ago, > possibly in the Log4perl docs, said that the init method was only intended > to implement initialisation, not re-initialisation. > > I may be wrong — I can't imagine ever calling init() twice, though I did > occasionally do it when I first started using the system, there was some > now-forgotten issue that stopped the practice. > > Why are you calling init twice? > > If it is just in case the config has chanced, there is an init-and-watch > method. > > If it is to combine configurations, the Hash::Merge module can help, and > there is a working example somewhere in the archives of this group. > > HTH > > > On 15/03/2013 21:54, Marc Zampetti wrote: > >> I have a program that configures a basic Log4perl config so that I have >> some sane logging until I'm able to read in the config file with the >> final configuration. I'm getting an error when calling >> Log::Log4perl->init() the second time that I cannot seem to track down. >> >> From the reading of the docs, this is a valid use case. Its a pretty >> basic perl script, not using fork() or threads or anything, and running >> from the commandline, not mod_perl or something like that. >> >> The error I get is: >> >> Can't call method "log" on an undefined value at >> /usr/lib/perl5/vendor_perl/5.**8.8/Log/Log4perl/Appender.pm line 189. >> >> This is generated when I do the second Log::Log4perl->init(filename) >> call. The first call to init passes in a string with the basic >> configuration. >> >> Anyone have any ideas what the issue might be? >> >> I'm running Log4perl-1.40, using Red Hat 5 64-bit. >> >> ------------------------------**------------------------------** >> ------------------ >> Everyone hates slow websites. So do we. >> Make your web apps faster with AppDynamics >> Download AppDynamics Lite for free today: >> http://p.sf.net/sfu/appdyn_**d2d_mar <http://p.sf.net/sfu/appdyn_d2d_mar> >> ______________________________**_________________ >> log4perl-devel mailing list >> log4perl-devel@lists.**sourceforge.net<log...@li...> >> https://lists.sourceforge.net/**lists/listinfo/log4perl-devel<https://lists.sourceforge.net/lists/listinfo/log4perl-devel> >> >> > |
From: Alexander H. <ale...@gm...> - 2013-03-16 12:10:56
|
On Fri, Mar 15, 2013 at 11:29 AM, Dmitry Bigunyak <ic...@in...> wrote: > Yes, that's actually how I see it, get the raw data, format them to a > certain type and pass to an appender. > As a matter of fact, this is exactly what Layouts allow me to do. I was > wrong saying that they are meant to render strings only. If fact you get an > array ref with all raw data inside the render() method. Maybe this is a bit > which is missing in the FAQ, "How can I write my own layout?". :) > So, I can implement my own Layout::JSON or/and Layout::XML and use them > with different appenders which working with strings. Nice! The only thing > I'm missing here is the ability to use built in layouts like PatternLayout > when I want to dump JSON to a log file as a formatted string. Or another > example, compressing the data before passing them to the appender. That > brings me to the idea of having a chain of layout (in current terminology) > when you get an actual result passed through a number of layouts and > formatted in each of them accordingly. But maybe this is a controversial > feature request and should be discussed in a separate thread. > > /Dmitry > > Пятница, 15 марта 2013, 8:01 +01:00 от Lee < le...@gm... >: > > Sorry to reply to such a long and thoughtful e-mail with a URI, but do > > you think being given access to the raw data would give you sufficient > > means to format it? > > > > > http://log4perl.sourceforge.net/releases/Log-Log4perl/docs/html/Log/Log4perl/FAQ.html#e8a46 > > > > Could you then forward the formatted data to an appender of your > > choice/via appenders listed in the config? > > > > Lee > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_mar > _______________________________________________ > log4perl-devel mailing list > log...@li... > https://lists.sourceforge.net/lists/listinfo/log4perl-devel > You might want to check out Message::Passing [1], Log::Dispatch::Message::Passing [2] to get your Log4perl messages into it and my Message::Passing::Output::Log::Any::Adapter [3] for the other direction. I wrote it to use Message::Passing to parse syslog messages and mail them using Log4perl with Log::Dispatch::Email. Keep us updated because I'm planning to push the log messages of all my Log4perl based Catalyst and MooseX::App::Cmd apps to a central log store, probably ElasticSearch and am interested in your use case and solution. [1] https://metacpan.org/module/Message::Passing [2] https://metacpan.org/module/Log::Dispatch::Message::Passing [3] https://metacpan.org/module/Message::Passing::Output::Log::Any::Adapter |
From: Lee <le...@gm...> - 2013-03-16 08:09:06
|
I don't know the L4p source, but I vaguely recall that someone, years ago, possibly in the Log4perl docs, said that the init method was only intended to implement initialisation, not re-initialisation. I may be wrong — I can't imagine ever calling init() twice, though I did occasionally do it when I first started using the system, there was some now-forgotten issue that stopped the practice. Why are you calling init twice? If it is just in case the config has chanced, there is an init-and-watch method. If it is to combine configurations, the Hash::Merge module can help, and there is a working example somewhere in the archives of this group. HTH On 15/03/2013 21:54, Marc Zampetti wrote: > I have a program that configures a basic Log4perl config so that I have > some sane logging until I'm able to read in the config file with the > final configuration. I'm getting an error when calling > Log::Log4perl->init() the second time that I cannot seem to track down. > > From the reading of the docs, this is a valid use case. Its a pretty > basic perl script, not using fork() or threads or anything, and running > from the commandline, not mod_perl or something like that. > > The error I get is: > > Can't call method "log" on an undefined value at > /usr/lib/perl5/vendor_perl/5.8.8/Log/Log4perl/Appender.pm line 189. > > This is generated when I do the second Log::Log4perl->init(filename) > call. The first call to init passes in a string with the basic > configuration. > > Anyone have any ideas what the issue might be? > > I'm running Log4perl-1.40, using Red Hat 5 64-bit. > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_mar > _______________________________________________ > log4perl-devel mailing list > log...@li... > https://lists.sourceforge.net/lists/listinfo/log4perl-devel > |
From: Marc Z. <mar...@gm...> - 2013-03-15 20:54:33
|
I have a program that configures a basic Log4perl config so that I have some sane logging until I'm able to read in the config file with the final configuration. I'm getting an error when calling Log::Log4perl->init() the second time that I cannot seem to track down. From the reading of the docs, this is a valid use case. Its a pretty basic perl script, not using fork() or threads or anything, and running from the commandline, not mod_perl or something like that. The error I get is: Can't call method "log" on an undefined value at /usr/lib/perl5/vendor_perl/5.8.8/Log/Log4perl/Appender.pm line 189. This is generated when I do the second Log::Log4perl->init(filename) call. The first call to init passes in a string with the basic configuration. Anyone have any ideas what the issue might be? I'm running Log4perl-1.40, using Red Hat 5 64-bit. |
From: Dmitry B. <ic...@in...> - 2013-03-15 10:29:57
|
Yes, that's actually how I see it, get the raw data, format them to a certain type and pass to an appender. As a matter of fact, this is exactly what Layouts allow me to do. I was wrong saying that they are meant to render strings only. If fact you get an array ref with all raw data inside the render() method. Maybe this is a bit which is missing in the FAQ, "How can I write my own layout?". :) So, I can implement my own Layout::JSON or/and Layout::XML and use them with different appenders which working with strings. Nice! The only thing I'm missing here is the ability to use built in layouts like PatternLayout when I want to dump JSON to a log file as a formatted string. Or another example, compressing the data before passing them to the appender. That brings me to the idea of having a chain of layout (in current terminology) when you get an actual result passed through a number of layouts and formatted in each of them accordingly. But maybe this is a controversial feature request and should be discussed in a separate thread. /Dmitry Пятница, 15 марта 2013, 8:01 +01:00 от Lee < le...@gm... >: > Sorry to reply to such a long and thoughtful e-mail with a URI, but do > you think being given access to the raw data would give you sufficient > means to format it? > > http://log4perl.sourceforge.net/releases/Log-Log4perl/docs/html/Log/Log4perl/FAQ.html#e8a46 > > Could you then forward the formatted data to an appender of your > choice/via appenders listed in the config? > > Lee > |
From: Lee <le...@gm...> - 2013-03-15 07:01:25
|
Sorry to reply to such a long and thoughtful e-mail with a URI, but do you think being given access to the raw data would give you sufficient means to format it? http://log4perl.sourceforge.net/releases/Log-Log4perl/docs/html/Log/Log4perl/FAQ.html#e8a46 Could you then forward the formatted data to an appender of your choice/via appenders listed in the config? Lee On 14/03/2013 17:25, Dmitry Bigunyak wrote: > Hi there! > > I was searching the mailing-list history but didn't find any topics related to the subject I'd like to discuss. Maybe I didn't look close enough, sorry if so. > Anyway, the subject I want to discuss is how to use log4perl for structured logging. > There are a couple of modules on CPAN related to this task, like for example Log::Log4perl::Layout::GELF, Log::Log4perl::Appender::Fluent or Log::Message::JSON. But different approaches implemented there gave me the impression that there is no a general convenient way of doing structured logging in log4perl. > Yes, you can pass an arbitrary list of parameters to the logger and it really depends on the appender if it can work with that or not, Log::Log4perl::Appender::DBI is a good example of how to do that. But what if I want to log my data to database, log file and lets say ElasticSearch at the same time. The problem here is that all three appenders expect data in different formats, File appender expects to get a string, DBI - a list of parameters and ElasticSearch - JSON. This is the place where you get stuck and has to choose something one. > The Log::Message::JSON module, as I understand it, is trying to address the problem using objects which get serialized to JSON in appenders expecting stings. But calling a special function (logmsg) every time you log something is quite a hassle and this is only JSON, what if I want to use XML? Here we go, there is no way in log4perl you can format you data before they are passed to appender. Layouts are meant to render messages, not arbitrary data. I also was trying to play with the warp_message appender option but it's result is always an array ref which doesn't work with File appender for example and it's probably not the best way to solve the problem. > To don't introduce new entities I'd say that Layouts is a proper place to make such transformations but it is just not how things work now. > > Can someone suggest a good solution for that or maybe an idea? > What are you thoughts in general on the problem, should it be solved in log4perl? > Thanks. > -- > Dmitry > e-mail: ic...@in... > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_mar > _______________________________________________ > log4perl-devel mailing list > log...@li... > https://lists.sourceforge.net/lists/listinfo/log4perl-devel |
From: Dmitry B. <ic...@in...> - 2013-03-14 16:25:51
|
Hi there! I was searching the mailing-list history but didn't find any topics related to the subject I'd like to discuss. Maybe I didn't look close enough, sorry if so. Anyway, the subject I want to discuss is how to use log4perl for structured logging. There are a couple of modules on CPAN related to this task, like for example Log::Log4perl::Layout::GELF, Log::Log4perl::Appender::Fluent or Log::Message::JSON. But different approaches implemented there gave me the impression that there is no a general convenient way of doing structured logging in log4perl. Yes, you can pass an arbitrary list of parameters to the logger and it really depends on the appender if it can work with that or not, Log::Log4perl::Appender::DBI is a good example of how to do that. But what if I want to log my data to database, log file and lets say ElasticSearch at the same time. The problem here is that all three appenders expect data in different formats, File appender expects to get a string, DBI - a list of parameters and ElasticSearch - JSON. This is the place where you get stuck and has to choose something one. The Log::Message::JSON module, as I understand it, is trying to address the problem using objects which get serialized to JSON in appenders expecting stings. But calling a special function (logmsg) every time you log something is quite a hassle and this is only JSON, what if I want to use XML? Here we go, there is no way in log4perl you can format you data before they are passed to appender. Layouts are meant to render messages, not arbitrary data. I also was trying to play with the warp_message appender option but it's result is always an array ref which doesn't work with File appender for example and it's probably not the best way to solve the problem. To don't introduce new entities I'd say that Layouts is a proper place to make such transformations but it is just not how things work now. Can someone suggest a good solution for that or maybe an idea? What are you thoughts in general on the problem, should it be solved in log4perl? Thanks. -- Dmitry e-mail: ic...@in... |
From: Alexander H. <ale...@gm...> - 2013-01-25 10:43:03
|
On Fri, Jan 25, 2013 at 12:43 AM, Alexander Hartmaier < ale...@gm...> wrote: > Hi Michael, > currently I haven't put the code anywhere public but I'll fork the > log4perl github repo if I have time tomorrow, commit my code and send the > pull request. > I think I haven't written tests for it though... > > Best regards, Alex > > > On Thu, Jan 24, 2013 at 4:57 AM, Mike Schilli <m...@pe...> wrote: > >> On Wed, 23 Jan 2013, Alexander Hartmaier wrote: >> >> I've written a Log::Log4perl::Filter::MDC filter cause I have to send >>> errors to different teams which I implemented by defining each teams >>> >> >> Hi Alex, >> >> that sounds great, do you have the code anywhere where we can take >> a look? Hard to say without looking at it if the best way is to merge it >> into the main Log4perl distribution or to roll your own CPAN package. If >> its generally useful, then by all means, lets integrate it. The easiest >> way to do that is forking the github repo at >> >> https://github.com/mschilli/**log4perl<https://github.com/mschilli/log4perl> >> >> then add your changes and send a pull request. >> >> Let me know if you need more detailed instructions. >> > I've written some tests, updated the list of contributors and sent a pull-request. I've also changed the list of contributors to be a list which is more git friendly when it comes to adding a new contributor. >> -- >> -- Mike >> >> Mike Schilli >> m...@pe... >> >> >> email address as appender and filter on a MDC value (the support group >>> which maps to each team). Should I release it to CPAN as separate >>> dist or do you want to include it in the Log::Log4perl dist? It adds >>> no dependencies and follows the Log::Log4perl naming for config keys. >>> >>> Best regards, Alex >>> >>> >>> > |
From: Alexander H. <ale...@gm...> - 2013-01-24 23:44:25
|
Hi Michael, currently I haven't put the code anywhere public but I'll fork the log4perl github repo if I have time tomorrow, commit my code and send the pull request. I think I haven't written tests for it though... Best regards, Alex On Thu, Jan 24, 2013 at 4:57 AM, Mike Schilli <m...@pe...> wrote: > On Wed, 23 Jan 2013, Alexander Hartmaier wrote: > > I've written a Log::Log4perl::Filter::MDC filter cause I have to send >> errors to different teams which I implemented by defining each teams >> > > Hi Alex, > > that sounds great, do you have the code anywhere where we can take > a look? Hard to say without looking at it if the best way is to merge it > into the main Log4perl distribution or to roll your own CPAN package. If > its generally useful, then by all means, lets integrate it. The easiest > way to do that is forking the github repo at > > https://github.com/mschilli/**log4perl<https://github.com/mschilli/log4perl> > > then add your changes and send a pull request. > > Let me know if you need more detailed instructions. > > -- > -- Mike > > Mike Schilli > m...@pe... > > > email address as appender and filter on a MDC value (the support group >> which maps to each team). Should I release it to CPAN as separate >> dist or do you want to include it in the Log::Log4perl dist? It adds >> no dependencies and follows the Log::Log4perl naming for config keys. >> >> Best regards, Alex >> >> >> |
From: Mike S. <m...@pe...> - 2013-01-24 03:57:44
|
On Wed, 23 Jan 2013, Alexander Hartmaier wrote: > I've written a Log::Log4perl::Filter::MDC filter cause I have to send > errors to different teams which I implemented by defining each teams Hi Alex, that sounds great, do you have the code anywhere where we can take a look? Hard to say without looking at it if the best way is to merge it into the main Log4perl distribution or to roll your own CPAN package. If its generally useful, then by all means, lets integrate it. The easiest way to do that is forking the github repo at https://github.com/mschilli/log4perl then add your changes and send a pull request. Let me know if you need more detailed instructions. -- -- Mike Mike Schilli m...@pe... > email address as appender and filter on a MDC value (the support group > which maps to each team). Should I release it to CPAN as separate > dist or do you want to include it in the Log::Log4perl dist? It adds > no dependencies and follows the Log::Log4perl naming for config keys. > > Best regards, Alex > > |
From: Alexander H. <ale...@gm...> - 2013-01-23 14:45:11
|
Hi Log4perl guys, I've written a Log::Log4perl::Filter::MDC filter cause I have to send errors to different teams which I implemented by defining each teams email address as appender and filter on a MDC value (the support group which maps to each team). Should I release it to CPAN as separate dist or do you want to include it in the Log::Log4perl dist? It adds no dependencies and follows the Log::Log4perl naming for config keys. Best regards, Alex |
From: Mike S. <m...@pe...> - 2013-01-12 01:58:30
|
On Wed, 9 Jan 2013, Lee Goddard wrote: > Is there a way to change the PatternLayout that the default Catalyst uses? According to the Catalyst::Log::Log4perl code you can pass in your own configuration file to specify a different layout and appender: unless ( Log::Log4perl->initialized ) { if ( defined($config) ) { if ($watch_delay) { Log::Log4perl::init_and_watch( $config, $watch_delay ); } else { Log::Log4perl::init($config); } } else { my $log = Log::Log4perl->get_logger(""); my $layout = Log::Log4perl::Layout::PatternLayout->new( "[%d] [catalyst] [%p] %m%n"); my $appender = Log::Log4perl::Appender->new( "Log::Log4perl::Appender::Screen", 'name' => 'screenlog', 'stderr' => 1, ); -- -- Mike Mike Schilli m...@pe... |
From: Lee G. <le...@gm...> - 2013-01-09 08:02:04
|
Is there a way to change the PatternLayout that the default Catalyst uses? It seems to default to logging to stderr, whilst tests default to out putting to stdout, and the difference in the emptying of the buffers makes the out-of-sync output hard to read. TIA Lee |
From: Mike S. <m...@pe...> - 2012-12-27 19:50:14
|
On Thu, 27 Dec 2012, Hugh Esco wrote: > I'm curious how the Log::Log4perl class knows what config file to read > when I invoke the ->appender_by_name() method. The appender_by_name method assumes L4p configuration has already happened. If you want to read from a config file, you need to call init() beforehand. > Also, once I have an $appender object, will ->filename() provide only > the filename, or also its path? You'll get the exact value as specified in the configuration. It could be an absolute path or a relative path or a filename (relative to cwd()). -- -- Mike Mike Schilli m...@pe... > I'm pretty sure my issue relates to a missing path, not L4P's > inability to create the file in that path when needed. > > Thanks again, > -- Hugh Esco > > Date: Thu, 27 Dec 2012 11:27:36 -0800 (PST) > From: Mike Schilli <m...@pe...> > Reply-To: Mike Schilli <m...@pe...> > To: Hugh Esco <he...@ca...> > cc: log...@li... > Subject: Re: [log4perl-devel] Introspecting the $logger object for log file > path and name? > > On Thu, 27 Dec 2012, Hugh Esco wrote: > >> Using Log::Log4perl, I need to test for the existence of a log path and >> create it if necessary, I had hopes that this might give me what I was >> looking for: >> >> my $path = >> Log::Log4perl->appender_by_name( >> 'log4perl.appender.A1.filename'); > > Hi Hugh, > > looks what you want to find out is if a file appender's log file is > present before you start your program. Note that this is not related to > the logger object, but to the appender object instead. > > First off, Log4perl will create missing log files. You can do this > either at log time or at init time. The former is the default behavior, > the second is triggered by the 'create_at_logtime' option. See 'perldoc > Log::Log4perl::Appender::File' for this and other create/recreate > options. > > Now, there are cases where you want to make sure the log file exists > before you init Log4perl, e.g. if the program's permissions don't allow > for creating the log file, but then you need to create it outside the > program anyway. Typically package installers (like rpm, dpkg etc.) take > care of this. > > Anyway, if you want access to the file appender's filename, you need to change > the line > >> Log::Log4perl->appender_by_name( >> 'log4perl.appender.A1.filename'); > > to something like > > my $appender = Log::Log4perl->appender_by_name( 'A1' ); > print $appender->filename(); > > Hope that helps, let me know if you need anything else! > > -- -- Mike > > Mike Schilli > m...@pe... > > > >> >> But I am getting (on the next line): >> >> Use of uninitialized value $path in substitution. >> >> Is there some way to query the class or perhaps the $logger object for >> what path and filename it expects from the configuration so I can >> created it before it is needed and its absence blows things up? >> >> I would try this with the $logger object itself, but attempting to >> instantiate one when the log file's path is missing blows things up. >> >> How do I automate this process so that an arbitrary path and file are >> created when my application is deployed into a fresh bare-metal >> environment? >> >> > > |
From: <he...@gr...> - 2012-12-27 19:44:25
|
Thank you. I will take a closer look at this once I am home. I'm curious how the Log::Log4perl class knows what config file to read when I invoke the ->appender_by_name() method. Also, once I have an $appender object, will ->filename() provide only the filename, or also its path? I'm pretty sure my issue relates to a missing path, not L4P's inability to create the file in that path when needed. Thanks again, -- Hugh Esco Date: Thu, 27 Dec 2012 11:27:36 -0800 (PST) From: Mike Schilli <m...@pe...> Reply-To: Mike Schilli <m...@pe...> To: Hugh Esco <he...@ca...> cc: log...@li... Subject: Re: [log4perl-devel] Introspecting the $logger object for log file path and name? On Thu, 27 Dec 2012, Hugh Esco wrote: > Using Log::Log4perl, I need to test for the existence of a log path and > create it if necessary, I had hopes that this might give me what I was > looking for: > > my $path = > Log::Log4perl->appender_by_name( > 'log4perl.appender.A1.filename'); Hi Hugh, looks what you want to find out is if a file appender's log file is present before you start your program. Note that this is not related to the logger object, but to the appender object instead. First off, Log4perl will create missing log files. You can do this either at log time or at init time. The former is the default behavior, the second is triggered by the 'create_at_logtime' option. See 'perldoc Log::Log4perl::Appender::File' for this and other create/recreate options. Now, there are cases where you want to make sure the log file exists before you init Log4perl, e.g. if the program's permissions don't allow for creating the log file, but then you need to create it outside the program anyway. Typically package installers (like rpm, dpkg etc.) take care of this. Anyway, if you want access to the file appender's filename, you need to change the line > Log::Log4perl->appender_by_name( > 'log4perl.appender.A1.filename'); to something like my $appender = Log::Log4perl->appender_by_name( 'A1' ); print $appender->filename(); Hope that helps, let me know if you need anything else! -- -- Mike Mike Schilli m...@pe... > > But I am getting (on the next line): > > Use of uninitialized value $path in substitution. > > Is there some way to query the class or perhaps the $logger object for > what path and filename it expects from the configuration so I can > created it before it is needed and its absence blows things up? > > I would try this with the $logger object itself, but attempting to > instantiate one when the log file's path is missing blows things up. > > How do I automate this process so that an arbitrary path and file are > created when my application is deployed into a fresh bare-metal > environment? > > |
From: Mike S. <m...@pe...> - 2012-12-27 19:27:56
|
On Thu, 27 Dec 2012, Hugh Esco wrote: > Using Log::Log4perl, I need to test for the existence of a log path and > create it if necessary, I had hopes that this might give me what I was > looking for: > > my $path = > Log::Log4perl->appender_by_name( > 'log4perl.appender.A1.filename'); Hi Hugh, looks what you want to find out is if a file appender's log file is present before you start your program. Note that this is not related to the logger object, but to the appender object instead. First off, Log4perl will create missing log files. You can do this either at log time or at init time. The former is the default behavior, the second is triggered by the 'create_at_logtime' option. See 'perldoc Log::Log4perl::Appender::File' for this and other create/recreate options. Now, there are cases where you want to make sure the log file exists before you init Log4perl, e.g. if the program's permissions don't allow for creating the log file, but then you need to create it outside the program anyway. Typically package installers (like rpm, dpkg etc.) take care of this. Anyway, if you want access to the file appender's filename, you need to change the line > Log::Log4perl->appender_by_name( > 'log4perl.appender.A1.filename'); to something like my $appender = Log::Log4perl->appender_by_name( 'A1' ); print $appender->filename(); Hope that helps, let me know if you need anything else! -- -- Mike Mike Schilli m...@pe... > > But I am getting (on the next line): > > Use of uninitialized value $path in substitution. > > Is there some way to query the class or perhaps the $logger object for > what path and filename it expects from the configuration so I can > created it before it is needed and its absence blows things up? > > I would try this with the $logger object itself, but attempting to > instantiate one when the log file's path is missing blows things up. > > How do I automate this process so that an arbitrary path and file are > created when my application is deployed into a fresh bare-metal > environment? > > |