Re: [log4j 1.x] Batch-sending with SMTPAppender

2016-11-16 Thread Ralph Goers
> On Nov 16, 2016, at 10:11 AM, Christopher Schultz > <ch...@christopherschultz.net> wrote: > > Ralph, > > On 11/16/16 9:49 AM, Ralph Goers wrote: >> First, I have to say that Log4j 1 reached end-of-life over a year >> ago. We recommend you upgrade to Log4

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

2017-03-22 Thread Ralph Goers
These are separate JVMs, so having a single executor would be of no help. I believe the only way to do what you are asking for is to add configuration so that the asynchronous thread has a semi-random delay when it starts. Ralph > On Mar 22, 2017, at 7:58 AM, Greg Thomas

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

2017-03-24 Thread Ralph Goers
Thanks for these answers >>>>>>>> >>>>>>>> @Ralph : that was the kind of idea I had in mind : changing the >>>>>>>> RollingFileManager.asyncExecutor to be a ScheduledThreadPoolExecutor, >>>>>> and >&

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

2017-03-24 Thread Ralph Goers
mars 2017 00:24, "Remko Popma" <remko.po...@gmail.com> a > écrit : >>>>>>>> >>>>>>>> >>>>>>>>> On Mar 23, 2017, at 1:06, Anthony Maire <maire.anth...@gmail.com> >>>>>>> w

Re: About performance

2017-03-30 Thread Ralph Goers
owable can give performance issue ? >>>> Yes. Avoid if you want good performance. >>>>> >>>>> >>>>> Regards. >>>>> >>>>> >>>>>> On Wed, Mar 29, 2017 at 5:49 PM, Remko Popma <remko.po...@gmail.com&

Re: Display text when thread context is empty

2017-03-22 Thread Ralph Goers
If userNumber does not exist in the ThreadContext then nothing will be included in the display. I am not aware that we have implemented any way to specify a default value for this, but with the Data Injection stuff that was added a few releases ago it might be possible. Ralph > On Mar 22,

Re: Kafka Appender with Programmatic Configuration

2017-03-29 Thread Ralph Goers
Mikael’s solution is correct. Every item in the ConfigurationBuilder is a Component. We have “special” Components for things that are always used, such as Loggers and Appenders. But we can’t know about every type of Component so in those cases you just use the generic Component. Ralph > On

Re: About performance

2017-03-29 Thread Ralph Goers
What Java version are you using? Why do you think your code is going to perform better than what Log4j is doing? The fastest way to get the caller information is to use Java 9’s StackWalker.getCallerClass() method which only takes a couple of milliseconds. But doing that might actually make

Re: Apache chainsaw

2017-03-29 Thread Ralph Goers
We can’t be pointing people to use snapshots from your personal page. I’m not even sure how you can publish there any more. Can’t you do a release if there are features that you use? It would be nice to at least say it supports Log4j 2 and how to set it up. Ralph > On Mar 29, 2017, at 12:30

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

2017-03-27 Thread Ralph Goers
, > Anthony > > 2017-03-24 18:47 GMT+01:00 Ralph Goers <ralph.go...@dslextreme.com>: > >> I thought CronTriggeringPolicy would handle this but it is based on >> Quartz’ CronExpression which doesn’t support randomizing fields. I was >> confused because Jenkins

Re: LogManager.resetConfiguration in log4j2

2017-03-15 Thread Ralph Goers
at the source code for resetConfiguration, it says it clears out >> all appenders and levels and whatnot. I suppose depending on the goals, >> yes, DefaultConfiguration makes more sense usually unless you're trying to >> disable logging while you manually configure thing

Re: Tomcat with many applications. Where to put log4j libs?

2017-03-15 Thread Ralph Goers
It should work that way, but if your applications have any custom plugins they wouldn’t be accessible unless they are also on tomcat-lib. If you are using any Log4j 2 components with dependencies then those dependencies (and their transitive dependencies) would have to be in tomcat/lib as well.

Re: log4j2 issue

2017-03-20 Thread Ralph Goers
This scenario is why I use Flume. The FlumeAppender will write the event to disk locally and then send it to a downstream flume agent. That flume agent writes it to its local disk and sends a response back to the Flume Appender that it allows it to delete the event from disk. The remote agent

Re: LogManager.resetConfiguration in log4j2

2017-03-14 Thread Ralph Goers
Actually, the equivalent would be set the configuration back to the DefaultConfiguratoin, not a null configuration. Ralph > On Mar 14, 2017, at 9:09 PM, Matt Sicker wrote: > > After looking at the source code for Hierarchy::resetConfiguration(), I see > that there's no

Re: Max index limit in DefaultRolloverStrategy

2017-04-11 Thread Ralph Goers
I believe starting with 2.8.1 we no longer scan the directory so it is much faster. We could probably raise the default limit. Ralph > On Apr 11, 2017, at 11:12 AM, Remko Popma wrote: > > Sorry to hear that! > > You are right that the docs currently don't mention the

Re: Kafka Appender with Programmatic Configuration

2017-04-05 Thread Ralph Goers
ontains an invalid element or attribute "name" >> >> It seems like the problem is that KeyValuePair have a "key" field, but >> builder.newComponent() >> assumes that it has a "name" field (like Property). >> >> On Wed, Mar 29, 2

Re: Apache chainsaw

2017-04-09 Thread Ralph Goers
earch log. Chainsaw was a great >>tool, but need update. >> >>I want to contribute to Chainsaw. >> >>On Sat, Apr 8, 2017 at 10:25 AM, Ralph Goers < >> ralph.go...@dslextreme.com> >>wrote: >> >>> Brett and Robert, are y

Re: [ANN] Log4j 2.8.2 released

2017-04-09 Thread Ralph Goers
lly. If you don't see the new logo on the site, it's probably a > caching issue. > > On 9 April 2017 at 13:52, Ralph Goers <ralph.go...@dslextreme.com > <mailto:ralph.go...@dslextreme.com>> wrote: > Thanks, but you used the 2.8.1 logo instead of 2.8.2. > > Oh darn,

Re: [ANN] Log4j 2.8.2 released

2017-04-09 Thread Ralph Goers
Thanks, but you used the 2.8.1 logo instead of 2.8.2. Oh darn, I just noticed the web site wasn’t updated either. I guess I will have to fix that. Ralph > On Apr 8, 2017, at 4:36 PM, Remko Popma wrote: > > Blogged:

Re: Max index limit in DefaultRolloverStrategy

2017-04-18 Thread Ralph Goers
gt;> Yes, that’d be great. 7 seems to too low for frequently filled logs. >>> And also guys, please document it. I am raising a JIRA ticket in this >> regards ( thanks Remko for the reminder). >>> Also yes, I have set a default purge policy, this is 90 days in our

Re: [ANNOUNCEMENT] Apache Log4j 2.8.1 released

2017-03-03 Thread Ralph Goers
sn't that what they use at GitHub?" :P > > On 3 March 2017 at 01:58, Remko Popma <remko.po...@gmail.com > <mailto:remko.po...@gmail.com>> wrote: > >> Blogged: https://blogs.apache.org/logging/entry/log4j-2-8-1-released >> >> >> On Fr

[ANNOUNCEMENT] Apache Log4j 2.8.1 released

2017-03-02 Thread Ralph Goers
The Apache Log4j 2 team is pleased to announce the Log4j 2.8.1 release! Apache Log4j is a well known framework for logging application behavior. Log4j 2 is an upgrade to Log4j that provides significant improvements over its predecessor, Log4j 1.x, and provides many other modern features such as

Re: Apache chainsaw

2017-04-07 Thread Ralph Goers
he old server online. If we >> set >>>> it up in Jenkins, we can also have snapshots published to Nexus. >>>> >>>> On 29 March 2017 at 14:53, Ralph Goers <ralph.go...@dslextreme.com> >>> wrote: >>>> >>>>> We ca

Re: Category is missing

2017-08-14 Thread Ralph Goers
What you are showing below is the output from the StatusLogger (log4j internal logging). It is not controlled by the logging configuration as all those logs are generated before and during configuration. Ralph > On Aug 14, 2017, at 8:33 AM, Jochen Wiedmann > wrote:

Re: FailoverAppender is not starting

2017-07-10 Thread Ralph Goers
I don’t think that is correct Remko. His configuration looked correct. But since he was getting a failure while the RollingFileAppender was initializing I think everything else failed. The Failover appender had not finished its initialization because it essentially had no appenders to monitor

Re: Desire for a Gitter channel?

2017-07-25 Thread Ralph Goers
SO is great as a user forum for questions. Remko has been doing an awesome job of answering questions there for quite some time. I try to also when time permits. But it is not a great place for discussions. Ralph > On Jul 25, 2017, at 12:04 PM, Matt Sicker wrote: > > SO or

Re: Suppressing exceptions from SMTPAppender [log4j 1.3]

2017-07-12 Thread Ralph Goers
There was an experimental branch for Log4j 1.3 but that was never released and was abandoned. Ralph > On Jul 12, 2017, at 11:16 AM, Matt Sicker wrote: > > Log4j 1.3? The last version of 1.x was 1.2.17 which is EOL. > > On 12 July 2017 at 13:13, Christopher Schultz

Re: Why LogManager load log4j.properties from target/test-classes when run TestNG in Eclipse

2017-06-29 Thread Ralph Goers
If Eclipse (or any other test environment) didn’t add test-classes to the class path how would it find your test classes. They would normally be first in the class path so that files you want to override for testing are picked up. I suspect this is why it is picking up a log4j.properties there

Re: Failing to initialize log4j2 configuration dynamically

2017-07-04 Thread Ralph Goers
;Mikael Ståldal" <mi...@apache.org> wrote: > > This is a bit strange from a JSON standpoint though, since the order of > properties in a JSON object is not supposed to be significant. > > > Agreed. What is the best way forward though? > > Ga

Re: Failing to initialize log4j2 configuration dynamically

2017-07-04 Thread Ralph Goers
This is not a bug but is intentional. Log4j processes configuration files from beginning to end. It does not scan the file twice as would be necessary if no order was required. Properties MUST come first so that they can be used by the configuration that follows. Because of that we will

Re: Apache commons-logging bridge for log4j2

2017-07-05 Thread Ralph Goers
The ServiceLoader needs special handling to work in OSGi. See http://blog.osgi.org/2013/02/javautilserviceloader-in-osgi.html Ralph > On Jul 5, 2017, at 10:27 AM, Matt Sicker wrote: > > It's loaded via the

Re: Failing to initialize log4j2 configuration dynamically

2017-07-05 Thread Ralph Goers
, it would make sense to look up the nodes by name and > ignore the order. Should be fairly easy I guess? > > > On 2017-07-05 01:26, Ralph Goers wrote: >> Like all of our configurations, the JSON input is read as a tree of nodes. >> In all of our configurations, first w

Re: Chainsaw Zeroconf FileAppender Error

2017-04-21 Thread Ralph Goers
OK - but I seem to recall hearing that a few years ago. Ralph > On Apr 21, 2017, at 4:29 PM, Scott Deboy <scott.de...@gmail.com> wrote: > > It's just missing branding requirements and a vote. > > On 4/21/17, Ralph Goers <ralph.go...@dslextreme.com> wrote: >&

Re: Trailing space on loglevel in properties file not trimmed

2017-04-25 Thread Ralph Goers
anguages/java/>. Doesn't seem like they > support Java 9 at the moment. > > On 25 April 2017 at 11:47, Ralph Goers <ralph.go...@dslextreme.com> wrote: > >> I’ve never looked at the Travis build. I don’t even know where it is >> running. It certainly isn’t configured

Re: Trailing space on loglevel in properties file not trimmed

2017-04-25 Thread Ralph Goers
ds/225522713 >> >> Seems like a broken build running mvn clean install locally runs fine ... >> >> -Ursprüngliche Nachricht- >> Von: Ralph Goers [mailto:ralph.go...@dslextreme.com] >> Gesendet: Dienstag, 25. April 2017 15:57 >> An: Log4J Users List &

Re: Trailing space on loglevel in properties file not trimmed

2017-04-25 Thread Ralph Goers
t out with Jenkins somehow, then we don't need it > anymore. > > On 25 April 2017 at 13:23, Ralph Goers <ralph.go...@dslextreme.com> wrote: > >> Why do we have something running there? >> >> Ralph >> >>> On Apr 25, 2017, at 11:01 AM, Mat

Re: Trailing space on loglevel in properties file not trimmed

2017-04-25 Thread Ralph Goers
How is it failing? Do you have Java 9 installed with toolchains configured? Ralph > On Apr 25, 2017, at 6:46 AM, Michael Lück wrote: > > Pull request is submitted but the build process seems buggy as my PR is not > the only one failing currently > >

Fwd: how to load an external log4j2.xml when running a standalone application?

2017-08-08 Thread Ralph Goers
The problem you are experiencing is that the command line shell is not treating log4j.configurationFile as a variable name. Try putting it in single quotes. Ralph > Begin forwarded message: > > From: LV XIAOYI > Subject: how to load an external log4j2.xml when running a

Re: JDBC appender not working

2017-08-09 Thread Ralph Goers
Why can’t the class for the connection factory be included in the class path? Ralph > On Aug 9, 2017, at 2:17 PM, Michael Carman wrote: > > After adding dest= to my configuration I can see the status messages > from log4j. I'm getting a ClassNotFoundException when

Re: greedy Flume appender

2017-06-20 Thread Ralph Goers
Your configuration below has 2 root loggers. There can only be one. From what you are describing it sounds like the first root logger is being ignored. Ralph > On Jun 20, 2017, at 10:12 AM, Martin Bobák wrote: > > Hello folks. > > I'm using Tomcat 8.5.15 with

Re: How can I use log4j 2 if there are both log4j and log4j 2 jars included in classpath?

2017-05-19 Thread Ralph Goers
To be frank, uber jars like this that include other people’s stuff are a terrible idea for exactly this reason. See http://activemq.apache.org/initial-configuration.html . It itemizes all the jars that are rolled into the uber jar. You

Re: Custom actions on rollover

2017-05-19 Thread Ralph Goers
> looking for some place to start. > that’s why I asked some kind of doc/overview of the framework that would > quickly get me started. > > > > thanks, > Chandra > > On 19 May 2017, 10:29 AM +0530, Ralph Goers <ralph.go...@dslextreme.com>, > wrote: >>

Re: How can I use log4j 2 if there are both log4j and log4j 2 jars included in classpath?

2017-05-19 Thread Ralph Goers
Yuck. Ralph > On May 19, 2017, at 9:10 AM, Gary Gregory <garydgreg...@gmail.com> wrote: > > You can also put all the Log4j 2 jars FIRST on the classpath. > > Gary > > On May 19, 2017 8:42 AM, "Ralph Goers" <ralph.go...@dslextreme.com> wrote: > &g

Re: Custom actions on rollover

2017-05-18 Thread Ralph Goers
I just updated the stack overflow article Remko mentioned to document the improvements that were made in 2.8. That still doesn’t solve your problem, but I don’t see why you couldn’t write a custom action. If we can write an action to delete the files I don’t see why one couldn’t log the names

Re: Log4j2 rolling file rotation by hour not working

2017-06-02 Thread Ralph Goers
This sounds like a bug that has already been reported. I would suggest you try the CronTriggeringPolicy instead o the TimeBasedTriggeringPolicy. Ralph > On Jun 2, 2017, at 3:19 AM, Joan Balagueró - ventusproxy > wrote: > > Hello, > > > > I致e posted this in

Re: RollingFileAppender not working consistently

2017-05-25 Thread Ralph Goers
Please see https://blogs.apache.org/foundation/entry/apache_logging_services_project_announces . We recommend you upgrade to Log4j 2. Log4j 1 has not been supported for years. Ralph > On May 25, 2017, at

Re: Log4j and Java 9 JPMS support

2017-09-18 Thread Ralph Goers
unnamed module goes to one file. >> >> Another question - has anyone tried log4j as named module on java 9? >> >> Best regards, Alex >> >> >>> Понедельник, 18 сентября 2017, 16:44 +03:00 от Ralph Goers < >> ralph.go...@dslextreme.com>: >

Re: Log4j and Java 9 JPMS support

2017-09-18 Thread Ralph Goers
Right now LoggerContexts are organized around ClassLoaders. We haven’t even talked about creating a ModuleContextSelector. If you want to help contribute towards that it would be welcome. Ralph > On Sep 18, 2017, at 1:18 AM, Alex Sviridov > wrote: > > Hi all >

Re: Adding level to appender in manual code configuration in log4j2

2017-09-23 Thread Ralph Goers
> On Sep 23, 2017, at 8:11 AM, Alex Sviridov > wrote: > > Hi all > > From here > (https://logging.apache.org/log4j/2.0/faq.html#config_sep_appender_level) > >> You don’t need to declare separate loggers to achieve this. You can >> set the logging level on the

Re: Logging previous messages based on current messages?

2017-09-13 Thread Ralph Goers
Please see https://issues.apache.org/jira/browse/LOG4J2-1137 . If that is along the lines of what you are looking for then feel free to comment there or add yourself as a watcher. I know I will get to this sooner or later unless someone beats

Re: Getting the LoggerContext from log4j-api

2017-09-20 Thread Ralph Goers
No. The Log4j API can be used as a general logging facade. How configuration is done is implementation specific so it can’t be accessed through the API. Ralph > On Sep 19, 2017, at 11:18 PM, Asma Zinneera Jabir wrote: > > I know that the usual way of getting the

Re: loggerContext for container shared lib

2017-10-04 Thread Ralph Goers
You didn’t say if you also have a log4j2.xml file in tomcat/lib. If you log something before the two web apps start I am certain that it would use the log4j2.xml in tomcat/lib. I will have to look at the code that loads the configuration file to determine which ClassLoader it will use when the

[ANNOUNCE] Apache Log4j 2.9.0 released

2017-08-30 Thread Ralph Goers
The Apache Log4j 2 team is pleased to announce the Log4j 2.9.0 release! Apache Log4j is a well known framework for logging application behavior. Log4j 2 is an upgrade to Log4j that provides significant improvements over its predecessor, Log4j 1.x, and provides many other modern features such as

Re: Do you have any plans to instrument `log4j2` with metrics?

2017-09-30 Thread Ralph Goers
Development of Log4j happens based on a) what committers are interested in doing or b) patches that are submitted by users. Sometimes we discuss things we want to develop in advance but most of the time we decide to do something and just do it. You are the first person to ask for metrics

Re: issues with log4j-web.jar deployed location

2017-09-27 Thread Ralph Goers
Yes, that is exactly what you want to do. Ralph > On Sep 27, 2017, at 3:12 PM, billok...@gmail.com wrote: > > thanks a lot for the prompt reply and explanation! > > the reason for using the log4j-web is to have each webapp logs to it's own > log file, thus the ${web:contextPath}.log. But

Re: issues with log4j-web.jar deployed location

2017-09-27 Thread Ralph Goers
Matt, remember you can install log4j in tomcat’s lib directory to have tomcat use log4j and then each web app can also have its own log4j configuration. If the ClassLoaderContextSelector is working correctly this should work just fine. Ralph > On Sep 27, 2017, at 2:58 PM, Matt Sicker

Re: Log4j2 - setting programatically the env variable

2017-08-25 Thread Ralph Goers
Is there a reason you didn’t use one of the Configurator.initialize() methods? Ralph > On Aug 25, 2017, at 2:17 AM, Darlea, Radu wrote: > > Answering myself: > The only solution I found by successive tries was to give up using the web > app style of integrating

Re: unexpected end of file

2017-09-01 Thread Ralph Goers
It sounds like your application is finishing before compression of the file completes, although from the information given I cannot be sure. Ralph > On Sep 1, 2017, at 6:18 AM, Tamer Gür wrote: > > Hi, > > i am using log4j2 2.8.2 with RollingFile and SizeBasedTriggeringPolicy

Re: Stack Overflow Question

2017-09-03 Thread Ralph Goers
When will the version users are supposed to use be released? Ralph > On Sep 3, 2017, at 2:00 PM, Scott Deboy wrote: > > I commented in SO. It worked with very minor changes to your test & > config, but you do have to use the latest version available in git. > It's not

Re: New log file does not get created when old log file deleted in case of TCPSocketServer

2017-08-31 Thread Ralph Goers
There are two general cases, Unix and Windows (IBM operating systems might exhibit either one of these). 1. Unix - The file is deleted. The OS gets rid of the directory entry so new applications have no way to access the data, but existing files can keep on writing to the files until they are

Re: How to build the Routing Appender with the ConfigurationBuilder

2017-11-27 Thread Ralph Goers
What you need to know is that with the ConfigurationBuilder everything is really a Component. Since Layouts, Appenders, Filters and Loggers are so common we have built specialized ComponentBuilders for them, but they could also be constructed with a generic ComponentBuilder.

Re: Some question when migrating from log4j to log4j2

2017-11-27 Thread Ralph Goers
You can call the getSource() method of the LogEvent and it will return the StackTraceElement of the caller. Ralph > On Nov 27, 2017, at 7:22 PM, 代超 wrote: > > Hi all, > Nowadays I am upgrading the log component. I used to use the log4j and > customize our own appender by

Re: Async Loggers Vs. Async Appenders

2017-11-23 Thread Ralph Goers
It seems you are trying to create an asynchronous root logger. For that you need to use AsyncRoot, not AsyncLogger. Ralph > On Nov 23, 2017, at 7:37 AM, Laurent Hasson wrote: > > > I saw on the log4j site > (https://logging.apache.org/log4j/2.x/manual/async.html)

[ANNOUNCEMENT] Apache Log4j 2.10.0 released

2017-11-23 Thread Ralph Goers
The Apache Log4j 2 team is pleased to announce the Log4j 2.10.0 release! Apache Log4j is a well known framework for logging application behavior. Log4j 2 is an upgrade to Log4j that provides significant improvements over its predecessor, Log4j 1.x, and provides many other modern features such

Re: new feature proposal - microloggers

2017-11-24 Thread Ralph Goers
This is a case where I would recommend the application be modified, if possible, to use a Marker. Instead of using a RegEx filter as Matt shows, which can be expensive if you have lots of logging, you could use the MarkerFilter. To do this, everywhere you log “Creating shared instance of

Re: Difference between slf4j-log4j12 vs log4j

2017-11-30 Thread Ralph Goers
The log4j artifact is the log4j 1 implementation. slf4j-log4j12 is the adapter slf4j uses to bind the SLF4J API to log4j 1. FWIW, you shouldn’t be using either of these. Log4j 1 reached end-of-life two years ago and isn’t supported by anyone. Ralph > On Nov 30, 2017, at 6:32 AM, Debraj

Re: Migrating from log4j1 to log4j2

2017-12-17 Thread Ralph Goers
Why are you trying to do this? What problem are you trying to solve? Simply trying to port code from Log4j 1 to Log4j 2 without evaluating what the best way is to achieve the desired results is not an approach I recommend. Ralph > On Dec 16, 2017, at 1:18 PM, Paladox

Re: Configuring properties file which is in resourcebundle

2017-12-14 Thread Ralph Goers
Resource bundles contain localized text for internationalization purposes, not configuration data. It is unfortunate that Sun chose to use the same properties file format for resource bundles and properties files, but using the PropertyResourceBundle class to read a property file is not

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

Re: A consult about log4j rollover policy

2017-12-19 Thread Ralph Goers
Please direct questions to the Log4j user’s list. You can use the CronTriggeringPolicy to trigger time-based events without requiring a log event to trigger it. Ralph > On Dec 19, 2017, at 6:46 AM, diligentapa wrote: > > Dear Rgoers, > It's my honor to send this

Re: Migrating from log4j1 to log4j2

2017-12-19 Thread Ralph Goers
the file we got the loggers back to the default value we had them set at. > Now in log4j2 there dosen't seem to be anything similar except from the one > you pointed too but that reset everything. > >On Tuesday, 19 December 2017, 21:11:26 GMT, Ralph Goers > <ralph.go...

Re: Migrating from log4j1 to log4j2

2017-12-19 Thread Ralph Goers
562c44bb753f6e52dc6be5fa52/src/main/java/org/apache/log4j/PropertyConfigurator.java#L120 > seems to say that it just reads the configuation but dosen't clear anything. > I wonder would something like be able to be added to log4j2 please? > > > > On Sunday, 17 December 2017, 23:30:02 GMT,

Re: Log4j Migration from 1.x to 2.x

2017-12-19 Thread Ralph Goers
I will give the same answer I gave to another user just last week. You are better off telling us what you are trying to achieve then asking questions like below. Log4j 2 works very differently than Log4j 1 and has more capabilities built in. It is better to take advantage of that then simply

Re: monitorInterval not working in tomcat

2017-12-19 Thread Ralph Goers
I would suggest you try it with See http://logging.apache.org/log4j/2.x/manual/configuration.html#Automatic_Reconfiguration Ralph > On Dec 19, 2017, at 5:11 PM, Enric Jaen

Re: Migrating from log4j1 to log4j2

2017-12-17 Thread Ralph Goers
r com.google class path that uses loggers. > But users would not know every logger under com.google so they wouldn't be > able to put them all back to the default so we set the log level to null and > reloaded the file without loosing any java appenders. But with log4j2 it &g

Re: Migrating from log4j1 to log4j2

2017-12-17 Thread Ralph Goers
va). >On Sunday, 17 December 2017, 17:56:42 GMT, Ralph Goers > <ralph.go...@dslextreme.com> wrote: > > Why are you trying to do this? What problem are you trying to solve? Simply > trying to port code from Log4j 1 to Log4j 2 without evaluating what the best > wa

Re: Migrating from log4j1 to log4j2

2017-12-17 Thread Ralph Goers
instead of the pattern layout. Though > if users want to modify it more then a config they use the system property to > override the default log4j configuation file and use there own. > > On Sunday, 17 December 2017, 20:44:09 GMT, Ralph Goers > <ralph.go...@dslextreme.com> w

Re: log4j vs log4jextras v1.x

2017-11-17 Thread Ralph Goers
Log4jextras was extra stuff for Log4j 1. Log4j 1 is not longer supported so neither would be log4jextras. Ralph > On Nov 17, 2017, at 11:22 AM, Alex O'Ree wrote: > > Sorry if this has been asked before, but i'm not clear on whether or not > log4jextras is a replacement

Re: Log4j Stacktrace - Only have certain lines in stacktrace

2017-12-11 Thread Ralph Goers
If you look at the documentation for the %ex pattern of the PatternLayout [1] you will see that you can do the exact opposite. You can specify packages that you don’t want to see. Ralph [1] http://logging.apache.org/log4j/2.x/manual/layouts.html#PatternLayout

Re: HTTPAPPENDER

2017-10-24 Thread Ralph Goers
Yes, that blog post is incorrect. The blog post links to our Jira issue. I have updated that to add the recommendation that user’s use JsonLayout and mention that the SocketServers are still supported. The blog post doesn’t allow comments and I see no other way to correct them. It is rather

Re: How to limit log output of large objects?

2017-10-31 Thread Ralph Goers
Your question isn’t really specific enough to answer. How are the large objects being logged? With their own Message? As parameters to a ParameterizedMessage? What’s the definition of large? Ralph > On Oct 30, 2017, at 9:57 PM, Dipak Pawar wrote: > > Hey, > > I

Re: Limiting individual log size & filtering some information from Logs

2017-12-20 Thread Ralph Goers
All of the expertise here is focused on Log4j 2. You’d probably have better luck with this question on StackOverflow. Ralph > On Dec 20, 2017, at 5:30 AM, Debraj Manna wrote: > > I am not able to upgrade to log4j2 yet. So is it possible to do in log4j? > > On Wed,

Re: JDK 9 no longer available for download

2018-05-23 Thread Ralph Goers
Yeah. This whole situation with Java versions sucks. Ralph > On May 23, 2018, at 9:39 AM, Matt Sicker wrote: > > It would certainly make sense for a build update. > > On 23 May 2018 at 11:00, Gary Gregory wrote: > >> Michael: >> >> You need to

Re: JDK 9 no longer available for download

2018-05-24 Thread Ralph Goers
Yes. Ralph > On May 24, 2018, at 7:41 AM, Gary Gregory <garydgreg...@gmail.com> wrote: > > Shouldn't we update our Java 9 build requirement to Java 10? > > Gary > > On Wed, May 23, 2018, 18:48 Ralph Goers <ralph.go...@dslextreme.com> wrote: > >> Y

Re: Why Log4J2 root logger consumes all log levels from the child loggers

2018-06-08 Thread Ralph Goers
That all sounds correct. Ralph > On Jun 7, 2018, at 11:59 PM, Никита Глухов wrote: > > Ok, if I understand you correctly there are such steps: > 1. We configure LoggerConfig ("Loggers" section) entities in a > configuration file (xml, json, yaml, properties, etc.). LoggerConfigs form >

Re: Why Log4J2 root logger consumes all log levels from the child loggers

2018-06-07 Thread Ralph Goers
Log4j works this way on purpose. Suppose you have: This will cause all debug logs for com.mycorp.alpha and info logs for com.mycorp.beta to be routed to the file appender. All other things will be logged at the error level. This saves you from having to put an appender reference on

Re: Wrong Exports and Automatic Module Name

2018-06-25 Thread Ralph Goers
Log4j-API is not an automatic module. It has a module-info.java file. Log4j-API does not “require” log4j-core. It’s module-info specification is exports org.apache.logging.log4j; exports org.apache.logging.log4j.message; exports org.apache.logging.log4j.simple; exports

[ANNOUNCE] Apache Log4j Audit 1.0.0 released

2018-06-22 Thread Ralph Goers
The Apache Log4j team is pleased to announce the Apache Log4j Audit 1.0.0 release! Apache Log4j Audit provides a framework for defining audit events and then logging them using Log4j. The framework focuses on defining the events and providing an easy mechanism for applications to log them,

Re: Wrong Exports and Automatic Module Name

2018-06-25 Thread Ralph Goers
StringOption('-module-path', classpath.asPath) >>} >> } >> >> >> Why putting it in classes/META-INF/versions/9 ? That approach was >> unknown to me. Most modules I have seen have it on the same place as >> the package root. >> >> >> D

Re: Wrong Exports and Automatic Module Name

2018-06-25 Thread Ralph Goers
I should have said “earlier versions of Java will ignore it”. Ralph > On Jun 25, 2018, at 11:44 AM, Ralph Goers wrote: > > The module-info.java file is in classes/META-INF/versions/9. Java 9+ will > find it there. Other versions of Java will ignore it. > > If you want to

Re: [ANNOUNCE] Apache Log4j Audit 1.0.0 released

2018-06-22 Thread Ralph Goers
t; On 22 June 2018 at 10:39, Ralph Goers wrote: > >> The Apache Log4j team is pleased to announce the Apache Log4j Audit 1.0.0 >> release! >> >> Apache Log4j Audit provides a framework for defining audit events and then >> logging them using Log4j. The framew

Re: Odd problem starting program with log4j2 on Windows

2018-07-03 Thread Ralph Goers
What do you get if you change the -D to log4j.configurationFile=“file://%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j2.xml”? A normal file protocol on Windows shouldl end up looking like file:///C:/path/to/file/file.txt. See

Re: Odd problem starting program with log4j2 on Windows

2018-07-03 Thread Ralph Goers
Also - Since %DEFAULT_SERVER_DIR% doesn’t have a leading “/“ you might have to specify file:///. Ralph > On Jul 3, 2018, at 3:56 PM, Ralph Goers wrote: > > What do you get if you change the -D to > log4j.configurationFile=“file://%DEFAULT_SERVER_DIR%\scripts\cloud-script

Re: How to use slf4j with log4j2

2017-12-24 Thread Ralph Goers
I’m a little confused. What class are you calling getLoggers() on? As far as I know SLF4J doesn’t have that method. As far as Log4j 2 goes, I thought I explained this in a prior email. Ralph > On Dec 24, 2017, at 5:01 AM, Paladox > wrote: > > Hi, how do

Re: Rendered Messages in Log4J 2

2017-12-25 Thread Ralph Goers
Based on what I am seeing of how Log4j 1 makes use of RendererSupport, the equivalent functionality is provided by the Message objects in Log4j 2. Each Message must implement a getFormattedMessage method to render the message contents more or less in the same way that Log4j 1 uses the

Re: Log4J2 Lookup working when run on IDE but not when run in the command line

2018-01-09 Thread Ralph Goers
Shoot. Replied to the wrong email. Sent from my iPhone > On Jan 9, 2018, at 3:00 PM, Ralph Goers <ralph.go...@dslextreme.com> wrote: > > Maybe, but the point is that the batch is managed by the appender, so there > is no need for a new method in the Appender interface. >

Re: Log4J2 Lookup working when run on IDE but not when run in the command line

2018-01-09 Thread Ralph Goers
Maybe, but the point is that the batch is managed by the appender, so there is no need for a new method in the Appender interface. Ralph > On Jan 9, 2018, at 2:20 PM, Matt Sicker wrote: > > A common source of problems with custom plugins is related to the > Log4j2Plugins.dat

Re: Rename log4j2.xml

2018-01-10 Thread Ralph Goers
As documented at http://logging.apache.org/log4j/2.x/manual/configuration.html#AutomaticConfiguration you can use log4j.configurationFile. Ralph > On Jan 10, 2018, at 8:40 AM, Debraj Manna

Re: what version are RollingFileAppender.newBuilder() and RollingFileAppender.Builder.setConfiguration supported in?

2018-01-16 Thread Ralph Goers
We should make it a common practice to add @since tags on anything that isn’t a 1.0 release. Ralph > On Jan 16, 2018, at 2:22 PM, Gary Gregory wrote: > > It looks like RollingFileAppender.Builder and RollingFileAppender.newBuilder() > were added for 2.7. > > Gary > >

Re: Chainsaw log-parsing classes

2018-01-19 Thread Ralph Goers
If you application is running somewhere and Mongo is running somewhere else I would recommend using the Flume Appender to send the events to a Flume node that is running where Mongo is. Then have Flume write the events to Mongo. Ralph > On Jan 19, 2018, at 8:32 AM, Joseph Husby

<    1   2   3   4   5   6   7   8   9   10   >