Re: Using log4j1.2.17 foter is not getting added to each log file in rollingfileappender

2016-01-04 Thread Gary Gregory
On Mon, Jan 4, 2016 at 11:04 PM, Anshu Garg1 wrote: > Hi Ralph, > > We have actually tried log4j2, but unfortunately with that also we could > not meet our requirements > > We are trying a JSON log using rolling file appender based on both time > and size but we are facing below challenges > >

Re: Using log4j1.2.17 foter is not getting added to each log file in rollingfileappender

2016-01-04 Thread Anshu Garg1
Hi Ralph, We have actually tried log4j2, but unfortunately with that also we could not meet our requirements We are trying a JSON log using rolling file appender based on both time and size but we are facing below challenges 1. Apache log4j2 default roll over implementation adds time stamp

Re: Using log4j1.2.17 foter is not getting added to each log file in rollingfileappender

2016-01-04 Thread Ralph Goers
Please see https://blogs.apache.org/foundation/entry/apache_logging_services_project_announces . Ralph > On Jan 4, 2016, at 11:14 PM, Anshu Garg1 wrote: > > Hi, > > We have extended patternlayout to set cus

Using log4j1.2.17 foter is not getting added to each log file in rollingfileappender

2016-01-04 Thread Anshu Garg1
Hi, We have extended patternlayout to set custom footer and header. Now when we use this pattern in rolling file appender footer is only added to last log file generated while header is added to all files. Our requirement is to have footer also added to files created. Any suggestion? Here is th

Re: Log4j 2 Conversion Pattern + negative precision

2016-01-04 Thread Gary Gregory
In Log4j2, you can use %c{2} to _include_ the rightmost 2 packages. See the docs you point to... Gary On Thu, Dec 3, 2015 at 4:11 AM, Schudt, Christian wrote: > Hello, > > log4j 1 has the possibiliy to specify a negative precision for the logger > name in the pattern, e.g.: > > c{-4} > > which

Re: syslogAppender pattern

2016-01-04 Thread Gary Gregory
Hi, The RFC5424 format is what it is: https://tools.ietf.org/html/rfc5424 If you want to do something else, you can use a SocketAppender configured with a PatternLayout. Gary On Tue, Nov 24, 2015 at 1:35 AM, jinhong lu wrote: > Hi, > > I want to write log to rsyslog > > when I use log4j1.x,

Re: Placeholder substitution in config xml

2016-01-04 Thread Veit Guna
Thanks for the feedback! Tracking it here: https://issues.apache.org/jira/browse/LOG4J2-1243 Cheers Veit Am 04.01.2016 um 22:27 schrieb Remko Popma: > Looks like the properties lookup does not account fully for default values > that are themselves lookups. Can you create a Jira ticket for this?

Re: Aw: Placeholder substitution in config xml

2016-01-04 Thread Remko Popma
Looks like the properties lookup does not account fully for default values that are themselves lookups. Can you create a Jira ticket for this? Thanks! Remko Sent from my iPhone > On 2016/01/04, at 23:56, Veit Guna wrote: > > Small correction: the system property is set via "-Dmyapp.logs=fooba

Aw: Placeholder substitution in config xml

2016-01-04 Thread Veit Guna
Small correction: the system property is set via "-Dmyapp.logs=foobar", of course. Just a typo during posting...   Gesendet: Montag, 04. Januar 2016 um 14:45 Uhr Von: "Veit Guna" An: log4j-user@logging.apache.org Betreff: Placeholder substitution in config xml Hi. I'm using log4j 2.5 in a RES

Placeholder substitution in config xml

2016-01-04 Thread Veit Guna
Hi. I'm using log4j 2.5 in a REST service. There I would like to use the placeholder substitution to allow configuration of the log location. I tried this: ${sys:mypapp.logs:-${env:MYAPP_LOGS:-logs}} This seems to work quite well with the exception, if myapp.logs is set, the path en