CronTriggeringPolicy in RollingFileAppender is behind by one iteration

2022-03-02 Thread Markus Dimmerling
Hello everyone, I have the following requirements for the migration of a custom log4j1 RollingFileAppender: * Log every morning into a new directory with the current date as the name of the directory and part of the log file name * If the size of a log file exceeds 100 MB, rollover to

Re: log4j RollingFileAppender filePattern issue when using the log4j Bridge

2022-02-02 Thread Ralph Goers
ednesday, February 2, 2022 11:21 AM > To: log4j-user@logging.apache.org > Cc: Yalamanchili, Sindhuja ; Datla, Subha > > Subject: log4j RollingFileAppender filePattern issue when using the log4j > Bridge > > Hello, > > We are having an issue with our RollingFileAppend

log4j RollingFileAppender filePattern issue when using the log4j Bridge

2022-02-02 Thread Black, Cody
From: Black, Cody Sent: Wednesday, February 2, 2022 11:21 AM To: log4j-user@logging.apache.org Cc: Yalamanchili, Sindhuja ; Datla, Subha Subject: log4j RollingFileAppender filePattern issue when using the log4j Bridge Hello, We are having an issue with our RollingFileAppender where the file

RollingFileAppender has odd behavior when using the Log4j 1.x bridge

2022-01-10 Thread Steve Barbieri
12:27 test.log.2 -rw-r- 1 root root 11K Jan 10 12:27 test.log2022-01-10 I get a log file named for the current day. I've experimented and it looks like the RollingFileAppender is also rolling at the end of each day. It didn't do this before using the bridge. Any idea why this is happe

Re: RollingFileAppender + DirectWriteRolloverStrategy does not rollover file

2020-04-27 Thread Ralph Goers
If you want both time and size then you need one %d pattern that reflects the interval for when you want rotation to occur - namely _MM_dd. Normally you would use %I in the pattern to increment a counter during the interval. But I suspect if you use ${date} in the file name of the pattern an

Re: RollingFileAppender + DirectWriteRolloverStrategy does not rollover file

2020-04-27 Thread Benjamin Asbach
Hi Ralph, thanks for taking some time. Basically I want a log which rotates at midnight and is limited in file size. So I'd expect that these files are generated: /2020_04_27/msg-2020_04_27-12_17_00.log (application started) /2020_04_27/msg-2020_04_27-18_13_30.log (log file exceed 250MB) /202

Re: RollingFileAppender + DirectWriteRolloverStrategy does not rollover file

2020-04-27 Thread Ralph Goers
The %d pattern only applies to time based rollovers. If you want the time in a size based rollover pattern then use the date lookup filePattern=/tmp/msg-$${date:_MM_dd}/nps-message-$${date:_MM_dd_HH_mm_ss}.log Ralph > On Apr 27, 2020, at 10:39 AM, Benjamin Asbach wrote: > > I guess

Re: RollingFileAppender + DirectWriteRolloverStrategy does not rollover file

2020-04-27 Thread Benjamin Asbach
I guess I've been glad to early. ``` appender.msglog.type = RollingFile appender.msglog.name = localmsglog appender.msglog.filePattern = /tmp/msg-%d{_MM_dd}/nps-message-%d{_MM_dd_HH_mm_ss}.log appender.msglog.layout.type = log4j1xmllayout appender.msglog.policies.type = Policies appende

Re: RollingFileAppender + DirectWriteRolloverStrategy does not rollover file

2020-04-27 Thread Benjamin Asbach
I guess I found a solution: ``` appender.msglog.type = RollingFile appender.msglog.name = localmsglog appender.msglog.filePattern = /tmp/msg-%d{_MM_dd}/nps-message-%d{_MM_dd_HH_mm_ss}.log appender.msglog.layout.type = log4j1xmllayout appender.msglog.policies.type = Policies appender.msg

RollingFileAppender + DirectWriteRolloverStrategy does not rollover file

2020-04-27 Thread Benjamin Asbach
Hej! Currently I try to configure log4j2 to: * create a log in a folder with dates: e.h. 2020_04_27/messages.20200427_13_39_01.log * limit the log size to 250MB (* use a custom layout) (* rollover every day) But I'm already stuck with the first two bullets ``` appender.msglog.type = RollingF

Re: extends RollingFileAppender

2020-02-19 Thread Ralph Goers
e/logging/log4j/core/appender/rolling/FileExtension.java>. Ralph > On Feb 19, 2020, at 8:37 AM, Ralph Goers wrote: > > The RollingFileAppender in Log4j 2 already supports pretty much every > compression type and supports removing files. See > http://logging.apache.or

Re: extends RollingFileAppender

2020-02-19 Thread Ralph Goers
The RollingFileAppender in Log4j 2 already supports pretty much every compression type and supports removing files. See http://logging.apache.org/log4j/2.x/manual/appenders.html#RollingFileAppender <http://logging.apache.org/log4j/2.x/manual/appenders.html#RollingFileAppender>. Under Ro

Re: extends RollingFileAppender

2020-02-19 Thread EDMONDO SENA
We've create a class ClLogFileAppender that extends RollingFileAppender. This class include other log type Files specific for our project. Example (Zip file,archive logs file, compress file, remove compressed file) and so on. You extend that class in order to enlarge log type files. On

Re: extends RollingFileAppender

2020-02-19 Thread Ralph Goers
, RollingFileAppender is final. You would have to tell us what you were trying to customize before we can tell you how to do it. Ralph > On Feb 19, 2020, at 8:00 AM, EDMONDO SENA wrote: > > Hi, > > it seems that is not possible to extend it in log4j2, because apache have > made i

extends RollingFileAppender

2020-02-19 Thread EDMONDO SENA
Hi, it seems that is not possible to extend it in log4j2, because apache have made it a final class in log4j2. In earlier version of log4j was possible easily extends it. This migration steps also doesn't specify how to move this functionality to log4j2. Can you write me how fix it? Thanks.

Won't delete old log files with RollingFileAppender + OnStartupTriggeringPolicy + DirectWriteRolloverStrategy

2019-11-30 Thread Anders
Hi, I am using log4j-slf4j-impl version 2.12.1, and an application that will be executed via command line and ternimated after finished. The application won't be executed more than once at the same time in local host, but it's possible we run it again while previous application is running. So I'

Re: Invoke custom code after RollingFileAppender append()

2019-02-17 Thread Gaurav
s could just write JavaScript directly in the config. > >>> > >>> Gary > >>> > >>>> On Fri, Feb 15, 2019 at 7:34 AM gaurav wrote: > >>>> > >>&g

Re: Invoke custom code after RollingFileAppender append()

2019-02-17 Thread Gaurav
s could just write JavaScript directly in the config. > >>> > >>> Gary > >>> > >>>> On Fri, Feb 15, 2019 at 7:34 AM gaurav wrote: > >>>> > >>&g

Re: Invoke custom code after RollingFileAppender append()

2019-02-15 Thread Ralph Goers
think the intention is to send email on rollover, based on this > SO comment > https://stackoverflow.com/questions/39137396/how-to-extend-log4j2-rollingfileappender/39141257#comment96203788_39141257 > > (Shameless plug) Every java main() method deserves http://picocli.info > >> O

Re: Invoke custom code after RollingFileAppender append()

2019-02-15 Thread Remko Popma
At least, I think the intention is to send email on rollover, based on this SO comment https://stackoverflow.com/questions/39137396/how-to-extend-log4j2-rollingfileappender/39141257#comment96203788_39141257 (Shameless plug) Every java main() method deserves http://picocli.info > On Feb

Re: Invoke custom code after RollingFileAppender append()

2019-02-15 Thread Ralph Goers
g? We could provide an implementation based on the scripting >>> API so folks could just write JavaScript directly in the config. >>> >>> Gary >>> >>>> On Fri, Feb 15, 2019 at 7:34 AM gaurav wrote: >>>> >>>> Hi log4jusers, &

Re: Invoke custom code after RollingFileAppender append()

2019-02-15 Thread Remko Popma
class pre and post >> even processing? We could provide an implementation based on the scripting >> API so folks could just write JavaScript directly in the config. >> >> Gary >> >>> On Fri, Feb 15, 2019 at 7:34 AM gaurav wrote: >>> >>&

Re: Invoke custom code after RollingFileAppender append()

2019-02-15 Thread Ralph Goers
t to invoke custom code(to send email) after the RollingFileAppender >> append event. >> >> What would you suggest? >> >> P.S. Cannot extend RollingFileAppender, as it is final. >> >> Please help >> >> Thank you, >> Gaurav >>

Re: Invoke custom code after RollingFileAppender append()

2019-02-15 Thread Gary Gregory
> Want to invoke custom code(to send email) after the RollingFileAppender > append event. > > What would you suggest? > > P.S. Cannot extend RollingFileAppender, as it is final. > > Please help > > Thank you, > Gaurav >

Invoke custom code after RollingFileAppender append()

2019-02-15 Thread gaurav
Hi log4jusers, Want to invoke custom code(to send email) after the RollingFileAppender append event. What would you suggest? P.S. Cannot extend RollingFileAppender, as it is final. Please help Thank you, Gaurav

Re: Log4j2 RollingFileAppender message not in order?

2018-02-21 Thread Gary Gregory
On Wed, Feb 21, 2018 at 10:41 AM, Remko Popma wrote: > I could be wrong, but I think the performance impact would be > prohibitive. Instead I would suggest doing some post-processing on the log > files. > I agree. Gary > > (Shameless plug) Every java main() method deserves http://picocli.inf

Re: Log4j2 RollingFileAppender message not in order?

2018-02-21 Thread Matt Sicker
In that case, you could log to a file and have a separate process collect and sort logs, or you can log directly to a networked appender and take the performance hit (which is probably higher than a heap-based approach). On 21 February 2018 at 11:41, Remko Popma wrote: > I could be wrong, but I

Re: Log4j2 RollingFileAppender message not in order?

2018-02-21 Thread Gary Gregory
On Wed, Feb 21, 2018 at 12:03 PM, Matt Sicker wrote: > In that case, you could log to a file and have a separate process collect > and sort logs, or you can log directly to a networked appender and take the > performance hit (which is probably higher than a heap-based approach). > That what data

Re: Log4j2 RollingFileAppender message not in order?

2018-02-21 Thread Remko Popma
I could be wrong, but I think the performance impact would be prohibitive. Instead I would suggest doing some post-processing on the log files. (Shameless plug) Every java main() method deserves http://picocli.info > On Feb 22, 2018, at 2:14, Benjamin Jaton wrote: > > Ah thanks for the thoug

Re: Log4j2 RollingFileAppender message not in order?

2018-02-21 Thread Benjamin Jaton
Ah thanks for the thoughts /feedback. I was just curious to know what you would think of such a design for apps that needs to guaranty ordering. Thanks! On Tue, Feb 20, 2018 at 2:36 PM, Remko Popma wrote: > To come back to our questions, what version of Log4j are you using? > Are you seeing log

Re: Log4j2 RollingFileAppender message not in order?

2018-02-20 Thread Remko Popma
To come back to our questions, what version of Log4j are you using? Are you seeing log entries that are out of order in the same thread? (Shameless plug) Every java main() method deserves http://picocli.info > On Feb 21, 2018, at 7:15, Matt Sicker wrote: > > On 20 February 2018 at 11:32, Benja

Re: Log4j2 RollingFileAppender message not in order?

2018-02-20 Thread Matt Sicker
On 20 February 2018 at 11:32, Benjamin Jaton wrote: > In the case of a multi threaded application, not async, would it be > possible to have avoid the potential mis ordering by having a 500ms (for > example) window of collection for log events, and instead of logging the > next log event in the q

Re: Log4j2 RollingFileAppender message not in order?

2018-02-20 Thread Benjamin Jaton
In the case of a multi threaded application, not async, would it be possible to have avoid the potential mis ordering by having a 500ms (for example) window of collection for log events, and instead of logging the next log event in the queue, the logic would be search for the oldest event in the qu

Re: Log4j2 RollingFileAppender message not in order?

2017-12-14 Thread Remko Popma
Best to upgrade to 2.10 if you’re not on it yet. Cheers! (Shameless plug) Every java main() method deserves http://picocli.info > On Dec 15, 2017, at 8:45, Benjamin Jaton wrote: > > Oh interesting. Well this one appender is not async but it is multi > threaded, so I think that explains it. >

Re: Log4j2 RollingFileAppender message not in order?

2017-12-14 Thread Benjamin Jaton
Oh interesting. Well this one appender is not async but it is multi threaded, so I think that explains it. Useful to know about 2031 though. Thanks Benjamin On Thu, Dec 14, 2017 at 2:54 PM, Remko Popma wrote: > Are you using Log4j 2.10? > The reason I’m asking is that the 2.10 release contains

Re: Log4j2 RollingFileAppender message not in order?

2017-12-14 Thread Remko Popma
Are you using Log4j 2.10? The reason I’m asking is that the 2.10 release contains a fix for https://issues.apache.org/jira/browse/LOG4J2-2031. Prior to 2.10, there was a possibility that log events ended up out of order in the log when you’re using async loggers or async appender and the append

Re: Log4j2 RollingFileAppender message not in order?

2017-12-14 Thread Ralph Goers
In a multi-threaded application it is entirely possible that log entries might be appear to be out of order. This is because the LogEvent will populate the timestamp field but then another thread might get control, generate its log event, and then pass it to the appender before the first thread

Log4j2 RollingFileAppender message not in order?

2017-12-14 Thread Benjamin Jaton
Hello, I am seeing logs that are not in order in the log file, it this expected when using a RollingFile appender? "appenders" : { "appender" : [ { "type" : "RollingFile", "name" : "ServerAppender", "PatternLayout" : { "pattern" : "%d{-MM-dd HH:mm:ss,SS

RoutingAppender with parameterized pattern/nested RollingFileAppender/evaluateOnStartup

2017-07-18 Thread Joachim Kanbach
Hi all, I'm using a configuration with two nested RoutingAppenders like this: [...] So the idea is to split

Re: RollingFileAppender not working consistently

2017-05-25 Thread Ralph Goers
er.file.layout.ConversionPattern=%d{-MM-dd HH:mm:ss} %-5p > %c{1}:%L - %m%n > > on my Windows machine. > Expectation is to see new file created every second, but it doesnt. All logs > appended to app.log initially created. > > > > -- > View this message in

Re: RollingFileAppender not working consistently

2017-05-25 Thread AlexD
is to see new file created every second, but it doesnt. All logs appended to app.log initially created. -- View this message in context: http://apache-logging.6191.n7.nabble.com/RollingFileAppender-not-working-consistently-tp8582p75831.html Sent from the Log4j - Users mailing list archive at Nabbl

Re: Using Log4J2 2.8 (via the 1.2 API Bridge) for Tomcat8 Internal Logging - RollingFileAppender does not (cannot?) create new Log File

2017-04-18 Thread Remko Popma
I didn't think it was possible to use Log4j2 for tomcat container logging. I thought they implemented a custom extension of Java util logging to prevent application logging issues to interfere with the container. But I could be wrong. Sent from my iPhone > On Apr 19, 2017, at 8:38, Ankit Agar

Re: Using Log4J2 2.8 (via the 1.2 API Bridge) for Tomcat8 Internal Logging - RollingFileAppender does not (cannot?) create new Log File

2017-04-18 Thread Ankit Agarwal
On Monday, April 10, 2017 5:20 PM, Remko Popma wrote: >If you enable internal Log4j2 logging with at >the top of your configuration, then you should see internal Log4j2 logging on >the console. >It should show details of what happens during a rollover. Can you post that >output

Re: Using Log4J2 2.8 (via the 1.2 API Bridge) for Tomcat8 Internal Logging - RollingFileAppender does not (cannot?) create new Log File

2017-04-10 Thread Remko Popma
If you enable internal Log4j2 logging with at the top of your configuration, then you should see internal Log4j2 logging on the console. It should show details of what happens during a rollover. Can you post that output? Sent from my iPhone > On Apr 11, 2017, at 4:07, Ankit Agarwal > wrote

Using Log4J2 2.8 (via the 1.2 API Bridge) for Tomcat8 Internal Logging - RollingFileAppender does not (cannot?) create new Log File

2017-04-10 Thread Ankit Agarwal
Hi, I’m using Log4J2 (2.8) via the 1.2 API Bridge for Tomcat 8 internal logging. I followed the instructions here: https://tomcat.apache.org/tomcat-8.0-doc/logging.html#Using_Log4j - With the exception that I also copied the Br

Re: defer creation of RollingFileAppender log files when Logger and/or AppenderRef level attribute has a value of "OFF"?

2016-07-12 Thread Matt Sicker
wer version. > > > > Thanks for considering fixing this issue in a way that would allow us to > continue to use just a basic RollingFileAppender. > > > > Regards, > > > > -Cheryl > > > > -Original Message- > > From: Ralph Goers [mailto:ral

Re: defer creation of RollingFileAppender log files when Logger and/or AppenderRef level attribute has a value of "OFF"?

2016-07-12 Thread Ralph Goers
ally hoping that > this issue was just a bug that had already been fixed in a newer version. > > Thanks for considering fixing this issue in a way that would allow us to > continue to use just a basic RollingFileAppender. > > Regards, > > -Cheryl > > -Original M

RE: defer creation of RollingFileAppender log files when Logger and/or AppenderRef level attribute has a value of "OFF"?

2016-07-12 Thread Cheryl_Mrozienski
a newer version. Thanks for considering fixing this issue in a way that would allow us to continue to use just a basic RollingFileAppender. Regards, -Cheryl -Original Message- From: Ralph Goers [mailto:ralph.go...@dslextreme.com] Sent: Thursday, July 07, 2016 8:03 PM To: Log4J Users L

Re: defer creation of RollingFileAppender log files when Logger and/or AppenderRef level attribute has a value of "OFF"?

2016-07-07 Thread Ralph Goers
In addition, I would suggest creating a Jira issue describing this. I would think adding a deferOpen option to defer opening the OutputStream until the first write occurs might be possible. Ralph > On Jul 7, 2016, at 3:59 PM, Remko Popma wrote: > > Cheryl, > > Just thinking out loud, Log4j 2

Re: defer creation of RollingFileAppender log files when Logger and/or AppenderRef level attribute has a value of "OFF"?

2016-07-07 Thread Remko Popma
Cheryl, Just thinking out loud, Log4j 2 has the ability to start logging to a new log file that is not explicitly defined in configuration with the RoutingAppender. See https://logging.apache.org/log4j/2.x/faq.html#separate_log_files You may be able to use this feature, perhaps in combination w

defer creation of RollingFileAppender log files when Logger and/or AppenderRef level attribute has a value of "OFF"?

2016-07-07 Thread Cheryl_Mrozienski
Dell - Internal Use - Confidential Hi, I am currently using Log4j version 2.3, but might be able to update to a newer version if that would help. I have a log4j2.xml file containing more than thirty RollingFileAppenders (one per product component). Most of these RollingFileAppenders will not

Re: How to properly create a RollingFileAppender with AppenderComponentBuilder in log4j 2

2016-01-23 Thread Ralph Goers
;> ap.giannaki...@gmail.com> wrote: >>>> >>>> Hello log4j team, >>>> >>>> I would like your assistance please. >>>> >>>> I am new to the log4j 2 API and am I not sure how to properly create a >>>> Rolling

Re: How to properly create a RollingFileAppender with AppenderComponentBuilder in log4j 2

2016-01-21 Thread Ralph Goers
lis Giannakidis < >> ap.giannaki...@gmail.com> wrote: >>> >>> Hello log4j team, >>> >>> I would like your assistance please. >>> >>> I am new to the log4j 2 API and am I not sure how to properly create a >>> RollingFileA

Re: How to properly create a RollingFileAppender with AppenderComponentBuilder in log4j 2

2016-01-21 Thread Gary Gregory
ow, so please be > patient. > > Ralph > > > On Jan 21, 2016, at 3:19 AM, Apostolis Giannakidis < > ap.giannaki...@gmail.com> wrote: > > > > Hello log4j team, > > > > I would like your assistance please. > > > > I am new to the log4j 2

Re: How to properly create a RollingFileAppender with AppenderComponentBuilder in log4j 2

2016-01-21 Thread Apostolis Giannakidis
; patient. > > Ralph > > > On Jan 21, 2016, at 3:19 AM, Apostolis Giannakidis < > ap.giannaki...@gmail.com> wrote: > > > > Hello log4j team, > > > > I would like your assistance please. > > > > I am new to the log4j 2 API and am

Re: How to properly create a RollingFileAppender with AppenderComponentBuilder in log4j 2

2016-01-21 Thread Ralph Goers
assistance please. > > I am new to the log4j 2 API and am I not sure how to properly create a > RollingFileAppender with the AppenderComponentBuilder in log4j 2. > > I managed to create a syslog appender using the AppenderComponentBuilder, > but as far as creating a RollingFileAppender

How to properly create a RollingFileAppender with AppenderComponentBuilder in log4j 2

2016-01-21 Thread Apostolis Giannakidis
Hello log4j team, I would like your assistance please. I am new to the log4j 2 API and am I not sure how to properly create a RollingFileAppender with the AppenderComponentBuilder in log4j 2. I managed to create a syslog appender using the AppenderComponentBuilder, but as far as creating a

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

2016-01-07 Thread Remko Popma
01/07/2016 03:42 AM > Subject:Re: Using log4j1.2.17 foter is not getting added to each > log file in rollingfileappender > > > > Anshu, > > What are your plans going forward? > Out of the 6 issues you raised, you've solved one yourself (custom > Message), two h

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

2016-01-06 Thread Anshu Garg1
To: Log4J Users List Date: 01/07/2016 03:42 AM Subject:Re: Using log4j1.2.17 foter is not getting added to each log file in rollingfileappender Anshu, What are your plans going forward? Out of the 6 issues you raised, you've solved one yourself (custom Message), two have

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

2016-01-06 Thread Remko Popma
latform Technology Center, India > > Phone: 8800096760 > E-mail: anshug...@in.ibm.com > > > > From: Remko Popma > To: Log4J Users List > Date: 01/06/2016 04:22 AM > Subject: Re: Using log4j1.2.17 foter is not getting added to each > log file in rollingfileappen

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

2016-01-06 Thread Anshu Garg1
-Thanks & Regards, Anshu Garg Platform Technology Center, India Phone: 8800096760 E-mail: anshug...@in.ibm.com From: Remko Popma To: Log4J Users List Date: 01/06/2016 04:22 AM Subject:Re: Using log4j1.2.17 foter is not getting added to each log file in rollingfileappe

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

2016-01-05 Thread Simon Park
FWIW, if you're stuck on Log4J 1.2.17, you could use the TimeAndSizeRollingAppender available from www.simonsite.org.uk to solve this use case. Best Regards, Simon Sent from my iPad > On 5 Jan 2016, at 06:14, Anshu Garg1 wrote: > > Hi, > > We have extended patternlayout to set custom foote

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

2016-01-05 Thread Gary Gregory
> > our own rollover strategy. But that was not a complete solution since > > first file name was saved in rolling file appender without time stamp and > > to change that we extended "AbstractOutputStreamAppender" to create our > > own RollingFileAppender (b

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

2016-01-05 Thread Remko Popma
mplemented > our own rollover strategy. But that was not a complete solution since > first file name was saved in rolling file appender without time stamp and > to change that we extended "AbstractOutputStreamAppender" to create our > own RollingFileAppender (bu

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

2016-01-05 Thread Ralph Goers
ented >>> our own rollover strategy. But that was not a complete solution since >>> first file name was saved in rolling file appender without time stamp and >>> to change that we extended "AbstractOutputStreamAppender" to create our >>> own Rollin

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

2016-01-05 Thread Anshu Garg1
o each log file in rollingfileappender FWIW, decoupling the filePattern from the rollover frequency is one of the things I had in mind with 1. LOG4J2-1198 <https://issues.apache.org/jira/browse/LOG4J2-1198>. On Tuesday, 5 January 2016, Gary Gregory wrote: > On Mon, Jan 4, 2016 at 11

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

2016-01-05 Thread Remko Popma
ut that was not a complete solution since > > first file name was saved in rolling file appender without time stamp and > > to change that we extended "AbstractOutputStreamAppender" to create our > > own RollingFileAppender (but most of code in it is from Apache, except >

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

2016-01-04 Thread Gary Gregory
at was not a complete solution since > first file name was saved in rolling file appender without time stamp and > to change that we extended "AbstractOutputStreamAppender" to create our > own RollingFileAppender (but most of code in it is from Apache, except > what we had t

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

2016-01-04 Thread Anshu Garg1
and to change that we extended "AbstractOutputStreamAppender" to create our own RollingFileAppender (but most of code in it is from Apache, except what we had to modify to set first file name with time stamp). http://stackoverflow.com/questions/30059333/log4j2-rolling-appender-filena

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: programmatically change max file size of RollingFileAppender

2015-12-09 Thread Ralph Goers
asser > > Sent: Wednesday, December 9, 2015 1:25 AM > Subject: Re: programmatically change max file size of RollingFileAppender > > This was fixed in LOG4J2-381. Unfortunately that is in the 2.5 release so > would require Java 7. I suppose you could back port the fix to 2.3

Re: programmatically change max file size of RollingFileAppender

2015-12-09 Thread Dave Glasser
er 9, 2015 1:25 AM Subject: Re: programmatically change max file size of RollingFileAppender This was fixed in LOG4J2-381. Unfortunately that is in the 2.5 release so would require Java 7.  I suppose you could back port the fix to 2.3. Ralph > On Dec 8, 2015, at 9:56 PM, D

Re: programmatically change max file size of RollingFileAppender

2015-12-08 Thread Ralph Goers
my code > needs to run on Java 1.6. Anyway, I am configuring everything > programmatically. When I create the RollingFileAppender with > RollingFileAppender.createAppender, I pass in as the policy parameter: > > SizeBasedTriggeringPolicy.createPolicy("10MB"); > &g

programmatically change max file size of RollingFileAppender

2015-12-08 Thread Dave Glasser
I'm using Log4j 2.3, rather than the latest 2.x version, because my code needs to run on Java 1.6. Anyway, I am configuring everything programmatically. When I create the RollingFileAppender with RollingFileAppender.createAppender, I pass in as the policy para

Re: RollingFileAppender maxDelayMillis?

2015-11-11 Thread Benjamin Jaton
gging. It may be a good idea to create a Jira ticket for this. > > > > > > > OK I will create a Jira for this. > > > > > > > > > > Remko > > > > > > > On 2015/11/11, at 5:16, Gary Gregory wrote: > > > > &g

Re: RollingFileAppender maxDelayMillis?

2015-11-10 Thread Remko Popma
be a good idea to create a Jira ticket for this. > > > > OK I will create a Jira for this. > > > > > > Remko > > > > > On 2015/11/11, at 5:16, Gary Gregory wrote: > > > > > > And more generally, can all appenders benefit from such

Re: RollingFileAppender maxDelayMillis?

2015-11-10 Thread Benjamin Jaton
will create a Jira for this. > > Remko > > > On 2015/11/11, at 5:16, Gary Gregory wrote: > > > > And more generally, can all appenders benefit from such a setting? > > > > Gary > > > > On Tue, Nov 10, 2015 at 11:04 AM, Benjamin Jaton < > benja

Re: RollingFileAppender maxDelayMillis?

2015-11-10 Thread Remko Popma
ote: > > And more generally, can all appenders benefit from such a setting? > > Gary > > On Tue, Nov 10, 2015 at 11:04 AM, Benjamin Jaton > wrote: > >> Hi, >> >> I am wondering if it would make sense to have a maxDelayMillis parameter >> for the Rollin

Re: RollingFileAppender maxDelayMillis?

2015-11-10 Thread Gary Gregory
And more generally, can all appenders benefit from such a setting? Gary On Tue, Nov 10, 2015 at 11:04 AM, Benjamin Jaton wrote: > Hi, > > I am wondering if it would make sense to have a maxDelayMillis parameter > for the RollingFileAppender (like FlumeAppender). > > Use case

RollingFileAppender maxDelayMillis?

2015-11-10 Thread Benjamin Jaton
Hi, I am wondering if it would make sense to have a maxDelayMillis parameter for the RollingFileAppender (like FlumeAppender). Use case: You have a web server access log, you produce an HTTP request and expect to see it (and the response) in the access logs right away-ish (or at least control

Re: Question - RollingFileAppender creates empty files

2015-09-17 Thread Ralph Goers
t;> >> >> - Original Message - >> From: "Ralph Goers" >> To: "log4j-user" >> Sent: Wednesday, September 16, 2015 6:01:55 PM >> Subject: Re: Question - RollingFileAppender creates empty files >> >> The files are created

Re: Question - RollingFileAppender creates empty files

2015-09-17 Thread Gary Gregory
case if > there's something that needs to be written to it. > > > - Original Message - > From: "Ralph Goers" > To: "log4j-user" > Sent: Wednesday, September 16, 2015 6:01:55 PM > Subject: Re: Question - RollingFileAppender creates empty fi

Re: Question - RollingFileAppender creates empty files

2015-09-16 Thread Csilla Fabian
og file only in case if there's something that needs to be written to it. - Original Message - From: "Ralph Goers" To: "log4j-user" Sent: Wednesday, September 16, 2015 6:01:55 PM Subject: Re: Question - RollingFileAppender creates empty files The files are create

Re: Question - RollingFileAppender creates empty files

2015-09-16 Thread Ralph Goers
The files are created as soon as the output stream is opened. This happens when the Appender starts. I’d have to see your configuration to understand why you would be getting multiple files though. Ralph > On Sep 16, 2015, at 7:23 AM, Csilla Fabian wrote: > > Hello, > > I'm using log4j2 Ro

Re: Question - RollingFileAppender creates empty files

2015-09-16 Thread Remko Popma
Hi, Can you provide your configuration file? Remko On Wed, Sep 16, 2015 at 11:23 PM, Csilla Fabian wrote: > Hello, > > I'm using log4j2 RollingFileAppenders to log events of a complex system. > My problem is that empty log files are created for every appender even if > the given subsystem has

Question - RollingFileAppender creates empty files

2015-09-16 Thread Csilla Fabian
Hello, I'm using log4j2 RollingFileAppenders to log events of a complex system. My problem is that empty log files are created for every appender even if the given subsystem has nothing to write to them. Is there any way to restrict the number of files using just the XML configuration file? I

Re: Question about RollingFileAppender

2015-09-02 Thread Remko Popma
om my iPhone > On 2015/09/03, at 7:06, "Boyang\(Jerry\) Peng" > wrote: > > Hello, > I am using RollingFileAppender to limit the number of log files. Is there a > way to use the > Default Rollover Strategy with a time %d{-MM-dd-HH-mm-ss} with a > and set max=

Question about RollingFileAppender

2015-09-02 Thread Boyang(Jerry) Peng
Hello, I am using RollingFileAppender to limit the number of log files.  Is there a way to use the Default Rollover Strategy with a time %d{-MM-dd-HH-mm-ss} with a  and set ?  How can use a time based format for the name of my log but limit the number of logs to a certain number and after

Re: Why RollingFileAppender do not work by size on WebLogic 10.3.3 with Log4J 1.2.16 and jdk 1.6.0_33?

2015-02-05 Thread Gary Gregory
és > > Av Belgrano 768 - piso 5 depto I > C.P: C1092AAU > Buenos Aires - Argentina > Teléfono: (54 11) 5256-4060 > Móvil: (54 9 11) 5751-1359 > Web: www.kennen-consulting.com > > -Mensaje original- > De: Gary Gregory [mailto:garydgreg...@gmail.com] > Envia

RE: Why RollingFileAppender do not work by size on WebLogic 10.3.3 with Log4J 1.2.16 and jdk 1.6.0_33?

2015-02-04 Thread Jordán E Moisés
enos Aires - Argentina Teléfono: (54 11) 5256-4060 Móvil: (54 9 11) 5751-1359 Web: www.kennen-consulting.com -Mensaje original- De: Gary Gregory [mailto:garydgreg...@gmail.com] Enviado el: miércoles, 04 de febrero de 2015 10:11 a.m. Para: Log4J Users List Asunto: Re: Why RollingFileAppe

Re: Why RollingFileAppender do not work by size on WebLogic 10.3.3 with Log4J 1.2.16 and jdk 1.6.0_33?

2015-02-04 Thread Gary Gregory
This looks worrisome: Caused by: java.lang. UnsupportedOperationException: Not implemented You could have the wrong version of some jars on your classpath. Which is what the JIRA issue https://issues.apache.org/jira/browse/LOG4J2-739 discusses. You need to debug your classpath and compare what

Re: Why RollingFileAppender do not work by size on WebLogic 10.3.3 with Log4J 1.2.16 and jdk 1.6.0_33?

2015-02-03 Thread Simon
If there's a great reason why you can't make the move to Log4J 2.x then you could try the TimeAndSizeRollingAppender for Log4J 1.2.x. Google the appender name. Best Regards, Simon Sent from Blue Mail On 22:45, 2 Feb 2015, at 22:45, "Jordán E Moisés" wrote: >Why Rol

RE: Why RollingFileAppender do not work by size on WebLogic 10.3.3 with Log4J 1.2.16 and jdk 1.6.0_33?

2015-02-03 Thread Jordán E Moisés
Remko: I tried, but I have a problem with XMLLayout for RollingFile; I see that there is an issue reported ([jira] [Commented] (LOG4J2-739) XMLLayout no out put, and Error). Is there any solution for this? --- JDK: --- 1.6.0_33

Re: Why RollingFileAppender do not work by size on WebLogic 10.3.3 with Log4J 1.2.16 and jdk 1.6.0_33?

2015-02-02 Thread Remko Popma
Hi Jordan, Currently all our efforts are focussed on log4j2. We are not actively supporting log4j-1.2 anymore. Would it be possible for you to upgrade? Best regards, Remko Sent from my iPhone > On 2015/02/03, at 7:43, Jordán E Moisés > wrote: > > Why RollingFileAppender do

Why RollingFileAppender do not work by size on WebLogic 10.3.3 with Log4J 1.2.16 and jdk 1.6.0_33?

2015-02-02 Thread Jordán E Moisés
Why RollingFileAppender do not work by size on WebLogic 10.3.3 with Log4J 1.2.16 and jdk 1.6.0_33 ? PROBLEM The file grows over the limit set by configuration. It only creates a new one when the WebLogic is restarted. DATA My "log4j.properties" is place at WEBAPP.war:\WEB-INF\c

Re: RollingFileAppender appears to be losing log entries

2014-11-02 Thread Ralph Goers
We have attempted to list the dependencies at http://logging.apache.org/log4j/2.x/runtime-dependencies.html and http://logging.apache.org/log4j/2.x/faq.html#which_jars . You

Re: RollingFileAppender appears to be losing log entries

2014-11-02 Thread Shawn Heisey
On 11/2/2014 12:57 PM, Ralph Goers wrote: > 1. I would check bugzilla to see if anyone has reported this. I don’t recall > seeing anything like it in the last 4 years. > 2. Log4j 1.x is not actively maintained. Even if you find that it is a bug it > is unlikely to ever be fixed. Upgrading to Log

Re: RollingFileAppender appears to be losing log entries

2014-11-02 Thread Ralph Goers
1. I would check bugzilla to see if anyone has reported this. I don’t recall seeing anything like it in the last 4 years. 2. Log4j 1.x is not actively maintained. Even if you find that it is a bug it is unlikely to ever be fixed. Upgrading to Log4j 2 is recommended. Ralph > On Nov 2, 2014, at

RollingFileAppender appears to be losing log entries

2014-11-02 Thread Shawn Heisey
I asked this question on the solr-user mailing list first, but got no response. It's a major party weekend, so I'm not really surprised, and I think this is probably a problem with log4j, not Solr. There appear to be large blocks of time missing in my solr logfiles created with slf4j->log4j an

  1   2   3   4   >