Re: Adding appenders programatically

2013-05-14 Thread Te Ta
What is the recommended way of adding appenders in log4j 2. In older version we were able to do Logger.getLogger(theCategory).addAppender(appender). Thanks! On Tue, May 14, 2013 at 7:51 PM, Te Ta wrote: > What is the recommended way of adding appenders in log4j 2. > > In older version we were

Re: Custom Syslog Format: Appending Exceptions?

2013-05-14 Thread Jason B
I find this interesting...you had to go back a few levels to implement this sort of custom behavior. I'd love to see your patches, since I'm curious if this can be incorporated into the SyslogAppender as opposed to going one or two levels above it. - Jason Black On Tue, May 14, 2013 at 2:10 AM,

Burst Filter - Use to limit messages sent over a specific period?

2013-05-14 Thread Jason B
I'm attempting to leverage a burst filter in my application. I wish to log errors and send e-mails any time we log an error. The main thing is, I don't want to send more than a few e-mails in a given time period (say, one per event per fifteen minutes), to avoid overwhelming my inbox with these e

Re: Need help: Steps in your INSTALL doc failing

2013-05-14 Thread Mary Laude
This worked! (see below) Thanks to all. Mary@WinServ2008-Enterprise /home/Mary/apache-log4j-1.2.17 $ java -cp ".;./log4j-1.2.17.jar" Hello 0 [main] DEBUG Hello - Hello world. 0 [main] INFO Hello - What a beatiful day. Mary On Tue, May 14, 2013 at 9:06 AM, Jacob Kjome wrote: > Whoops, I ne

Re: Need help: Steps in your INSTALL doc failing

2013-05-14 Thread Jacob Kjome
Whoops, I neglected one thing... java -cp .;log4j-1.2-17.jar Hello Notice I added the current directory to the classpath.  Change the classpath separator character to a colon if needed. Jake On Tue, 14 May 2013 09:00:57 -0700  Mary Laude wrote: Here is what I just did.  Note I am actuall

Re: Need help: Steps in your INSTALL doc failing

2013-05-14 Thread Mary Laude
Also, if it helps, I've got jdk1.7.0_21 installed for java stuff. Mary On Tue, May 14, 2013 at 9:00 AM, Mary Laude wrote: > Here is what I just did. Note I am actually inside a Win VM, at a cygwin > prompt. > > Mary@WinServ2008-Enterprise /home/Mary/apache-log4j-1.2.17 > $ ls > build.properties

Re: Need help: Steps in your INSTALL doc failing

2013-05-14 Thread JOSE L MARTINEZ-AVIAL
Assuming the package of Hello.class is the default package(so, no package) the following should work: $ java -cp .:./log4j-1.2.17.jar Hello 2013/5/14 Mary Laude > Here is what I just did. Note I am actually inside a Win VM, at a cygwin > prompt. > > Mary@WinServ2008-Enterprise /home/Mary/apac

Re: Need help: Steps in your INSTALL doc failing

2013-05-14 Thread Mary Laude
Here is what I just did. Note I am actually inside a Win VM, at a cygwin prompt. Mary@WinServ2008-Enterprise /home/Mary/apache-log4j-1.2.17 $ ls build.properties.sample INSTALL log4j-1.2.17.jar site build.xmlJarDir.class NOTICEsrc contr

Re: Need help: Steps in your INSTALL doc failing

2013-05-14 Thread Jacob Kjome
No, Mary is just running an example from the install documentation.  And since the code is calling BasicConfigurator.configure(), there is no need for a config file in the classpath (though it is generally recommended to use a config file rather than configure via code). Mary, please provide

Re: Custom Syslog Format: Appending Exceptions?

2013-05-14 Thread Tomek Kaczynski
Sure, I'll try in following days. Tomek On Tue, May 14, 2013 at 2:35 PM, Gary Gregory wrote: > Would you like to create a JIRA and contribute a patch? > > Gary > > On May 14, 2013, at 4:11, Tomek Kaczynski > wrote: > > > Hi, > > > > In my case I created a SyslogWrapperLayout which can wrap

Re: Custom Syslog Format: Appending Exceptions?

2013-05-14 Thread Gary Gregory
Would you like to create a JIRA and contribute a patch? Gary On May 14, 2013, at 4:11, Tomek Kaczynski wrote: > Hi, > > In my case I created a SyslogWrapperLayout which can wrap any other > layout, so I put PatternLayout inside SyslogWrapperLayout. As far as I see > that's the only way to ge

Re: Custom Syslog Format: Appending Exceptions?

2013-05-14 Thread Tomek Kaczynski
Hi, In my case I created a SyslogWrapperLayout which can wrap any other layout, so I put PatternLayout inside SyslogWrapperLayout. As far as I see that's the only way to get cusomizeable Layout for syslog. Ah, and one more thing, I don't use SyslogAppender, but a simple SocketAppender with Sys