Re: Compression of rolled files : performance issue when lots of JVMs are using timed based policy

2017-03-22 Thread Greg Thomas
>One common issue we have with that framework (and I assume we can have the >same with log4j2) is that all of our JVMs (we can have more than 50 JVMs on >the same server in production) roll their file at midnight. > >When this happens, the system became often not usable for a few seconds >because

Re: Zipped rolling file - name of file entry

2016-12-09 Thread Greg Thomas
ies as it goes, so it's not vital, just something odd that I spotted. Greg On 9 December 2016 at 16:21, Christopher Schultz < ch...@christopherschultz.net> wrote: > Greg, > > On 12/9/16 3:46 AM, Greg Thomas wrote: > >> So, to clarify, the file contained in the rolled over

Re: Zipped rolling file - name of file entry

2016-12-09 Thread Greg Thomas
gt; So, to clarify, the file contained in the rolled over zip files (like > "my.20.log.zip") is called "my.1.log", not "my.1.log.zip", correct? > (Your original email said the rolled over zip files contain zip files, > which sounds like a bug...) > > Sen

Re: Zipped rolling file - name of file entry

2016-12-08 Thread Greg Thomas
On 8 December 2016 at 15:58, Apache wrote: > That indeed does seem strange. I will have to try it myself. You may have > found a bug. Thinking on this a bit more ... At a point in time, my.1.log is zipped to my.1.log.zip Some time later, my.1.log.zip is renamed to

Zipped rolling file - name of file entry

2016-12-08 Thread Greg Thomas
I'm using a RollingFileAppender, configured similar to ... %d %-5p [%c{1}] %X - %m%n So far so good. I get 20 logs files, my.1.log.zip -> my.20.log.zip, as I would expect. However, the file contained with

Script configuration (was Re: Triggering a purge programatically)

2016-08-16 Thread Greg Thomas
> As http://logging.apache.org/log4j/2.x/manual/configuration.html#Scripts < http://logging.apache.org/log4j/2.x/manual/configuration.html#Scripts> > states, if you set status=“DEBUG” in your configuration it will print the list of > scripting engines you have installed and will print the valid

Re: Triggering a purge programatically

2016-08-16 Thread Greg Thomas
g values. > > The language is whatever is supported by javax.script.ScriptEngineFactory. > JavaScript comes out of the box, and Groovy is another common one, so it's > mentioned as an alternative. > > And that last thing is probably a typo. > > On 16 August 2016 at 11:12, Greg Thom

Re: Triggering a purge programatically

2016-08-16 Thread Greg Thomas
gt; Have you looked at http://logging.apache.org/log4j/2.x/manual/appenders. > html#Log_Archive_Retention_Policy:_Delete_on_Rollover < > http://logging.apache.org/log4j/2.x/manual/appenders. > html#Log_Archive_Retention_Policy:_Delete_on_Rollover>? > > Ralph > > > >

Triggering a purge programatically

2016-08-16 Thread Greg Thomas
Is it possible to programatically trigger a purge? I've got an XML configured appender along the lines of ... %d %-5p [%c{1}] %X - %m%n i.e. create new log file on startup, and when the current one reaches

Re: How exactly are you supposed to use CloseableThreadContext?

2016-06-20 Thread Greg Thomas
Ah, yes. It seems the javadocs are wrong :( They pre-date the introduction of the helper class A better (i.e. working!) example is at https://logging.apache.org/log4j/2.x/manual/thread-context.html @Test public void name() throws Exception { try (final CloseableThreadContext.Instance ctc =

Re: BOM dependency with gradle

2016-06-02 Thread Greg Thomas
ent from my iPhone > >> On 2016/06/02, at 17:03, Greg Thomas <greg.d.tho...@gmail.com> wrote: >> >> Is there a correct syntax to use the BOM dependency with gradle? >> >> I've currently got the following ... >> >> compile group: 'org.apac

BOM dependency with gradle

2016-06-02 Thread Greg Thomas
Is there a correct syntax to use the BOM dependency with gradle? I've currently got the following ... compile group: 'org.apache.logging.log4j,' name: 'log4j-bom', version: '2.6' compile group: 'org.apache.logging.log4j', name: 'log4j-api' compile group: 'org.apache.logging.log4j', name:

Re: time based file roller anomoly

2016-05-10 Thread Greg Thomas
On 10 May 2016 at 14:30, Van Jaarsveldt, Charl wrote: > I then tried to shut down the service and rename the file. It gave an error > and told me the file was open by the system. I clicked retry, and it worked > fine. Very strange. Do you have some sort of anti-virus

Re: ThreadContext - auto-closable?

2016-04-01 Thread Greg Thomas
a Jira issue or reference it in a pull request from a Jira > issue. > > Ralph > >> On Apr 1, 2016, at 3:16 AM, Greg Thomas <greg.d.tho...@gmail.com> wrote: >> >> I was looking at the ThreadContext section of the API @ >> http://logging.apache.org/log4j/2.x/manual/th

LogManager.getFormatterLogger() - no arg method?

2015-08-04 Thread Greg Thomas
Apologies if this has been asked before, but is there a good reason why there is a LogManager.getLogger() method with no args that returns a Logger with the name of the calling class, but there is not a matching LogManager.getFormatterLogger() with similar functionality for a formatterLogger? Is

Re: LogManager.getFormatterLogger() - no arg method?

2015-08-04 Thread Greg Thomas
Heh, OK, someone is way ahead of me :) Thanks On 4 August 2015 at 15:53, Gary Gregory garydgreg...@gmail.com wrote: Greg, Such a method is in Git master, which will be included in the upcoming 2.4 release. Gary On Tue, Aug 4, 2015 at 7:12 AM, Greg Thomas greg.d.tho...@gmail.com wrote

Minor error in documentation

2012-09-24 Thread Greg Thomas
I've just noticed a trivial error in the documentation; at http://logging.apache.org/log4j/2.x/mail-lists.html the link mail-archives.apache.org for the log4j-user mailing list actually links to the log4j-dev mailing list. Greg