Mickael Marrache | 18 Sep 18:53 2014
Picon

Ignoring log event after log4j was shut down

Hi,

I just started to use Log4j 2 with the asynchronous logger feature, I
followed the guide but after a running a unit test, I always get the
following log entry at the end instead of the last line I expect:

2014-09-18 16:45:56,030 FATAL Ignoring log event after log4j was shut down

If I disable remove the Log4jContextSelector  system property, I can see the
last log entry instead of the error.

I guess the log4j engine is shut down and therefore it ignores the log
entry? If yes, why it is not shut down after the test ends?

Regards,

Mickael

Christian Müller | 8 Sep 17:22 2014
Picon

Logging requirement for PCI (payment card industry)

Hello list!

For PCI requirement 10.2.6 (Initialization, stopping, or pausing of the
audit logs) [1], I'm wondering what the best solution would be from your
point of view?

The PCI requirement are detailed further in the spec:
Verify the following are logged:
 - Initialization of audit logs
 - Stopping or pausing of audit logs

Turning the audit logs off (or pausing them) prior to performing illicit
activities is a common practice for malicious users wishing to avoid
detection. Initialization of audit logs could indicate that the log
function was disabled by a user to hide their actions.

The PCI auditor told us, "it's enoght" if the application logs when it's
started and when it's stopped.

[1] https://www.pcisecuritystandards.org/documents/PCI_DSS_v3.pdf

Thanks in advance,
Christian
-----------------

Software Integration Specialist

Apache Member
V.P. Apache Camel | Apache Camel PMC Member | Apache Camel committer
Apache Incubator PMC Member
(Continue reading)

Gary Gregory | 8 Sep 14:46 2014
Picon

[survey] What version of Java do you use?

Curious:

What version of Java do you use with Log4j 1?
What version of Java do you use with Log4j 2?

Thank you,
Gary

--

-- 
E-Mail: garydgregory <at> gmail.com | ggregory <at> apache.org
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory
Manikumar Reddy | 5 Sep 14:15 2014
Picon

log4j2 Slow Starup

Hi,

I am using log4j 2.0.2. I have 20 rolling file appenders.
log4j initialization is taking more than 20 seconds.

java stack trace is showing  PluginManager.collectPlugins code.

Is there any way to reduce the startup time?
Is it possible to disable the plugin find process?

Thanks
Kumar
Remko Popma | 5 Sep 09:27 2014
Picon

Re: How to disable Serialized plugin listing files on classpath - Initialization slowness

This may be related to LOG4J2-798. 
Feel free to attach your config to that Jira (or a new one if this is different) if it demonstrates the issue or
can help us reproduce the issue. 

Sent from my iPhone

> On 2014/09/05, at 15:46, Kamal C <kamaltarget <at> gmail.com> wrote:
> 
> Hi
> During my testing Log4j 2 takes considerable amount of time to initialize.
> In my log4j2.XML, i have around 40 Rolling file appenders and a console
> appender. It took 22-25 seconds to initialize all of them. I have seen them
> by turning on TRACE level logs.
> 
> I had gone through Log4j2 docs, they said PluginManager looks for custom
> plugins in the class-path and the packages in the configuration of
> log4j2.xml. I gave my required packages to look for custom plugins in
> configuration.
> 
> To disable seriailzed listing of files , during my compilation time i run
> the following command
> 
> javac -d . -cp "MY_CLASSPATH" -proc:only -processor
> org.apache.logging.log4j.core.config.plugins.processor *.java
> 
> It created a META-INF folder in my class-path which it contains one
> Log4j2Plugins.dat file. Then i started my testing, even then it takes 20-22
> seconds to initialize. How should i minimize the initialization time?
> 
> Any help would be greatly appreciated.
(Continue reading)

Kamal C | 5 Sep 08:46 2014
Picon

How to disable Serialized plugin listing files on classpath - Initialization slowness

Hi
During my testing Log4j 2 takes considerable amount of time to initialize.
In my log4j2.XML, i have around 40 Rolling file appenders and a console
appender. It took 22-25 seconds to initialize all of them. I have seen them
by turning on TRACE level logs.

I had gone through Log4j2 docs, they said PluginManager looks for custom
plugins in the class-path and the packages in the configuration of
log4j2.xml. I gave my required packages to look for custom plugins in
configuration.

To disable seriailzed listing of files , during my compilation time i run
the following command

javac -d . -cp "MY_CLASSPATH" -proc:only -processor
org.apache.logging.log4j.core.config.plugins.processor *.java

It created a META-INF folder in my class-path which it contains one
Log4j2Plugins.dat file. Then i started my testing, even then it takes 20-22
seconds to initialize. How should i minimize the initialization time?

Any help would be greatly appreciated.

Thanks,
Kamal. C
Mikael Ståldal | 4 Sep 18:03 2014

Log4j 2.x Web app initialization logging

Log4jServletContainerInitializer, Log4jServletContextListener,
Log4jServletFilter and Log4jWebInitializerImpl log some stuff using
ServletContext.log() at startup and shutdown.

Why? I find this logging noisy when done when everything works fine.

--

-- 
Mikael Ståldal
Chief Software Architect
*Appear*
Phone: +46 8 545 91 572
Email: mikael.staldal <at> appearnetworks.com
Mohit Anchlia | 4 Sep 00:00 2014
Picon

org.apache.loggin.log4j.core.pattern.DatePatternConverter blocking

I am using log4j2 and I am seeing almost all the threads
momentarily getting blocked on
org.apache.loggin.log4j.core.pattern.DatePatternConverter class. Is this
expected?
Yogesh Rao | 2 Sep 16:24 2014
Picon

Log4j2's SimpleLogger Implementation Issue for var args method's

Hi,

There seems to be an issue with SimpleLogger implementation provided by
log4j2. The issue seems to be in the new improved API supporting
placeholders and var args when called with an Object Array of size 0.

for e.g logger.error("Hello World {} in {} " , new Object[0]);

A statement above results in an error as shown below

ERROR StatusLogger Unable to locate a logging implementation, using
SimpleLogger
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -1
       at
org.apache.logging.log4j.simple.SimpleLogger.logMessage(SimpleLogger.java:157)
       at
org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:1347)
       at
org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1312)
       at
org.apache.logging.log4j.spi.AbstractLogger.error(AbstractLogger.java:539)
       at TestError.main(TestError.java:21)

I managed to look at the code as well and it looks like a condition to
check of the var arg param array size is missing in SimpleLogger

 155 final Object[] params = msg.getParameters();
 156         Throwable t;
 157         if (throwable == null && params != null &&
params[params.length - 1] instanceof Throwable) {
(Continue reading)

Curtis Ruck | 30 Aug 02:53 2014

dynamic appender registration

I'm looking at integrating Log4j2 into a complex desktop application,
because of it's async logging implementation.  The problem I'm running into
is that I'd like to dynamically register/unregister an appender on the root
logger (or any user specified logger).  The problem though is that I can't
find any API (in core or otherwise) that would actually allow this.

--
Curtis
Michael Schall | 29 Aug 21:07 2014
Picon

Extending Appenders

I'm upgrading an application to use Log4j2.  With our existing
implementation we have created a new appender which extends the
SMTPAppender.  I see the SMTPAppender is a final class now which prevents
me from extending it.  I was wondering what the reason for this is?  Do we
really need to re-implement the the entire SMTPAppender (properties,
buffering, ...) to extend the appender?

Thanks for your time.

Mike

Gmane