Re: downsides/overhead of stashing & restoring (probably empty) ThreadContextMap ?

2021-11-08 Thread Chris Hostetter
: Personally, I wouldn’t bother. I have a standard practice of populating : the ThreadContextMap from HTTP headers in a ServletFilter and then : clearing the ThreadContext on the way out. See : https://github.com/apache/logging-log4j-audit/blob/master/log4j-audit/log4j-audit-api/src/main/java

downsides/overhead of stashing & restoring (probably empty) ThreadContextMap ?

2021-11-08 Thread Chris Hostetter
TL;DR: Are there any serious performance concerns to be aware of with using something like... doFilter(ServletRequest req, ServletResponse rsp, FilterChain c) { final Map ctx = ThreadContext.getContext(); try { c.doFilter(req,rsp); } finally { ThreadContext.clearMap() if (

Re: Fwd: Temporarily store/restore the current configuration

2021-11-08 Thread Chris Hostetter
: var ctx = (LoggerContext) LogManager.getContext(false); : var current = ctx.getConfiguration(); : try { : ctx.setConfiguration(myQuietConfiguration); : otherCode(); : } finally { : ctx.setConfiguration(current); : } : : But it doesn't. Neither with reconfigure nor with setConfiguration.

Log4J 2 configuration: parameterizing appender via environment variable

2016-02-10 Thread Chris Nauroth
current functionality by trying to implement our own logic to parse things like "DEBUG,ROLLINGFILE" and translate to what Log4J 2 expects, but given the amount of flexibility that was possible, I expect attempting to do this would be brittle. Does anyone have other suggesti

Re: Logger.setLevel() not supported in 2.0?

2014-07-24 Thread Chris Graham
I certainly would! I often leave a logger (yes, a static one) in info model and change levels depending on what is going in. Ie, kick it into debug mode as needed. Saves from a lot of scroll blindness. -Chris Sent from my iPhone On 23/07/2014, at 4:32 PM, Merten Schumann wrote: > He

Re: log4j2 2.0-rc1 issues on AIX

2014-03-20 Thread Chris Graham
+1 to the default of Block! 1ns is too small. No wonder is sucked CPU. :-) Thanks for looking! -Chris Sent from my iPhone On 21/03/2014, at 1:32 PM, Remko Popma wrote: > Took another look at the Disruptor SleepingWait strategy. It actually uses > a back-off strategy. From the j

Re: log4j2 2.0-rc1 issues on AIX

2014-03-20 Thread Chris Graham
lpars that are not as busy. So the number of active CPU's can dynamically vary. -Chris On Fri, Mar 21, 2014 at 9:01 AM, Remko Popma wrote: > No, it turned out that the docs for Apache Archiva were incorrect and the > WaitStrategy was effectively still SleepingWaitStrategy. U

Re: log4j2 2.0-rc1 issues on AIX

2014-03-18 Thread Chris Graham
09000121FAF4 [libj9thr26.so+0x2af4]) 4XENATIVESTACK _pthread_body+0xf0 (0x097D4D34 [libpthreads.a+0x3d34]) NULL Would you like me to attach the complete sleep.tprof and javacore.txt file to the Jira ticket that I just created? https://issues.apache.org/jira/browse/LOG4J2

Re: log4j2 2.0-rc1 issues on AIX

2014-03-18 Thread Chris Graham
tached > stack trace below, the AsyncLoggerConfig-1 thread seems to be parked, > waiting for a new log event... Doesn't explain high CPU usage... > > Sent from my iPhone > > > On 2014/03/19, at 10:27, Chris Graham wrote: > > > > Hello Everyone. > > > &

log4j2 2.0-rc1 issues on AIX

2014-03-18 Thread Chris Graham
D4 [libj9vm26.so+0x65d4]) 4XENATIVESTACK (0x09000121FAF4 [libj9thr26.so+0x2af4]) 4XENATIVESTACK _pthread_body+0xf0 (0x097D4D34 [libpthreads.a+0x3d34]) NULL I've been dealing with Olivier, from Archiva, and he suggested that I drop a message in here. Are there any known issues with this? -Chris

Re: Overlapping Classes

2014-02-08 Thread Chris Veal
ly overlap the log4j code in an attempt to override that code? Thanks, Chris On Sat, Feb 8, 2014 at 3:18 PM, Matt Sicker wrote: > Actually, let me follow that up with a further question: is this in a log4j > 1.2.17 environment only, or is this when paired with log4j 2.0? > > >

Fwd: Overlapping Classes

2014-02-07 Thread Chris Veal
can't find RendererMap. Any ideas on how to get this code to work properly with the overlapping classes? Thanks, Chris

Configuring a system-wide logger factory

2010-09-18 Thread Chris
How can I configure a system-wide logger factory? I need to subclass Logger and have my subclass be used everywhere. When I try to configure it using these options: log4j.loggerFactory=org.foo.MyLoggerFactory log4j.rootCategory=INFO, A log4j.appender.A=org.foo.MyAppender I get: Caused by: jav

Loggers share an Appender instance?

2010-09-17 Thread Chris
When you configure the root logger to use an Appender, all other named loggers that you create share that Appender instance. The system does not create a new Appender for each child logger. This makes it impossible to create an Appender that maintains state for a given child logger. (And it's

RE: Multiple Configuration Files

2010-09-08 Thread Chris W. Dickinson
Can anyone assist with this question? Or, if it's been answered before, at least point me in the direction of finding the answer? -Christopher -Original Message- From: Chris W. Dickinson Sent: Thursday, September 02, 2010 1:07 AM To: 'log4j-user@logging.apache.org' Su

Dynamic logger configuration

2010-09-07 Thread Chris
How can I trap calls to Logger.getLogger() so I can configure each logger dynamically? Our app operates on data in dynamically-created directories. Every time we see a new directory, we want to create a new logger to put the logs in a new subdirectory. This means that we need a new logger inst

Is DailyRollingFileAppender stable?

2010-09-05 Thread Chris
The javadoc for DailyRollingFileAppender says: "DailyRollingFileAppender has been observed to exhibit synchronization issues and data loss. The log4j extras companion includes alternatives which should be considered for new deployments and which are discussed in the documentation for org.apach

Multiple Configuration Files

2010-09-01 Thread Chris W. Dickinson
I am developing against a third-party Java application. This application uses the command line configuration for log4j: -Dlog4j.configuration=log.prp I do not wish to overwrite the log.prp in the application, as it would create headaches when we upgrade the core application software. However, I

Start-up configuration

2008-10-22 Thread Chris Kimball
ectory does it turn up in under various systems? Chris Kimball -- View this message in context: http://www.nabble.com/Start-up-configuration-tp20108988p20108988.html Sent from the Log4j - Users mailing list archive at Nabble.com. ---

Log4J on Clustered Env.

2008-07-30 Thread Chris Gilliam
Curious if anyone has any information about running Log4J in a clustered Environment. Also, using rolling log files in a clustered environment. Curious what will happen to the rolling logs since servers will probably not be on the exact time as the other? Thanks, Chris

Re: custom log4j DRFA file name

2008-07-30 Thread Chris Pratt
Maybe log4j.appender.T=org.apache.log4j.DailyRollingFileAppender log4j.appender.T.File=${catalina.base}/logs/application.log log4j.appender.T.DatePattern='.'-MM-dd'.log' log4j.appender.T.layout=org.apache.log4j.PatternLayout log4j.appender.T.layout.ConversionPattern=[%d{EE MMM d kk:mm:ss }

Method Signature Overlap between log4j-1.2 log4j-1.3

2008-07-07 Thread Chris Pratt
Anyone know where I can find out the commonly named method signature differences? Thanks. Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Move app from using log4j-1.3alpha-6 to log4j-1.2.11 (or 13)

2008-07-02 Thread Chris Pratt
e with the same name but different functionalities from 1.3. Any help or pointers to documentation would be very helpful. Thanks. Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Log Files per Workstation

2008-06-30 Thread Chris Gilliam
a specific workstation vs the whole application and bring the server to a crawl while logging a few hundred workstations. Thanks in advance. Chris

Logging levels per workstation

2008-06-30 Thread Chris Gilliam
a specific workstation vs the whole application and bring the server to a crawl while logging a few hundred workstations. Thanks in advance. Chris

Stack Trace to RollingFileAppender but not SyslogAppender?

2008-05-21 Thread Chris Pratt
*** Been all over today searching for a fix, but finding nothing... Hope someone can help... *** Have an existing app that has been happily logging locally using: *** Implementing a central loghost and wanted to get a copy of the log into syslogd. Added a new appender:

Re: Log4J and Tomcat 5.5 - Trouble getting started

2007-03-08 Thread Chris Chappell
Ahh - it's been a while since doing this stuff so I'm a bit rusty. Was rather obvious - but I was off round the houses trying to find something wrong elsewhere. Thanks for the help. Chris - Original Message - From: "Jacob Kjome" <[EMAIL PROTECTED]> To

Re: Log4J and Tomcat 5.5 - Trouble getting started

2007-03-06 Thread Chris Chappell
quot;Jacob Kjome" <[EMAIL PROTECTED]> To: "Log4J Users List" Sent: Monday, March 05, 2007 10:37 PM Subject: Re: Log4J and Tomcat 5.5 - Trouble getting started Quoting Chris Chappell <[EMAIL PROTECTED]>: Hi I'm developing an app with Tomcat 5.5 and am trying to add

Log4J and Tomcat 5.5 - Trouble getting started

2007-03-05 Thread Chris Chappell
l stab at a faces app - is this anything to do with the prob? Any help greatfully recieved Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Excluding IP from log without custom filter

2007-02-23 Thread Chris Fellows
Thanks for the fast response. LogBack uses 1.5 jdk and we're not quite ready to upgrade that to 5. Is there a way I can use log4j or commons to accomplish the type of filter I mentioned? Regards, Chris - Original Message From: Ceki Gülcü <[EMAIL PROTECTED]> To: Log4J

Excluding IP from log without custom filter

2007-02-22 Thread Chris Fellows
offers this through exclusion filters, but we’re not quite ready to do a full upgrade across all our webapps. Example of logged entry to be excluded: 192.168.126.3 - - [22/Feb/2007:11:10:07 -0500] "GET / HTTP/0.9" 200 12248 "-" "-" Thanks for any help, Chris

Automatically zipping and archiving logs?

2007-01-24 Thread Chris
Does anyone know of a way to zip log files automatically and copy them to an archive? I'm thinking that an Appender that did this would be cool. We've got an installation with a number of app servers that generate huge logs at very high speed. If we could zip a log whenever it rolled over, and

Re: AW: Unnecessary garbage

2007-01-24 Thread Chris
Wyss Patrick wrote: Why does the logger force you to use Strings? no body is forced to log *strings* have a look at the signature of Logger.info(): public void info(Object message) Internally, I'm sure the info() method is calling Object.toString(), which does create a new String object.

Unnecessary garbage

2007-01-23 Thread Chris
Why does the logger force you to use Strings? logger.info("some string here" + someValue); In most cases, you're going to be creating some dynamic value that must be constructed, which means that you are always better off using a char array or a StringBuffer to build it. These buffers can be r

Re: File Appender in log4j

2006-11-22 Thread Chris Dillon
Curt Arnold apache.org> writes: > On Nov 21, 2006, at 4:21 PM, ying lcs wrote: > > > Hi, > > > > Can you please tell me how can I configure file appender so that it > > writes to 1 log file per data and have the old one stays? > > > > Thank you. > > I guessing that you meant "1 log file per DAY

Re: NPE from DOMConfigurator.configureAndWatch

2006-11-14 Thread Chris Cheshire
k, Eelke [mailto:[EMAIL PROTECTED] Sent: dinsdag 14 november 2006 11:28 To: Log4J Users List Subject: RE: NPE from DOMConfigurator.configureAndWatch Hi Chris, Looks like something is going wrong in the functionality that checks the configuration file for changes (what exactly would be the next nut

Re: NPE from DOMConfigurator.configureAndWatch

2006-11-13 Thread Chris Cheshire
Can anyone help shed some light on this please? On 11/7/06, Chris Cheshire <[EMAIL PROTECTED]> wrote: Hi, I am using log4j 1.2.13 in a web app deployed on SJAS 9. The logging is initialised in a ServletContextListener subclass in the contextInitialised method. String conf

Re: dynamically adding to a log file name?

2006-11-09 Thread Chris Cheshire
DohI got this solved, I used < > entities in the layout specification and it worked. Thanks for the help James, the MDC helps with the logging of a comment at the end of the file, and that combined with your DateFormatFileAppender is good enough for what I need. Cheers Chris On 1

Re: dynamically adding to a log file name?

2006-11-09 Thread Chris Cheshire
On 11/9/06, James Stauffer <[EMAIL PROTECTED]> wrote: Search the archives for people who wanted a separate log per MDC value (usually login name). OK I found the MDC section in the manual and it looks to be what I need *except* I cannot create XML style comments in the log file to contain the

Re: dynamically adding to a log file name?

2006-11-09 Thread Chris Cheshire
Thanks James, I'll look into this. I think I can guarantee a unique id as the requests are unique and the logging for the request and response are done in the same method. On 11/9/06, James Stauffer <[EMAIL PROTECTED]> wrote: You could look into including some MDC value in the filename (assuming

Re: dynamically adding to a log file name?

2006-11-09 Thread Chris Cheshire
Because the request is generated in a library not an application. The library has no concept of what container it is running in or where it should save files. I felt log4j was the best solution for this as it allows me to turn this on and off at will and goes with the trace info I have in there al

dynamically adding to a log file name?

2006-11-08 Thread Chris Cheshire
omment to the end of the file via the pattern layout, but I am looking for something that will help for scan value in matching the files up. Thanks Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

NPE from DOMConfigurator.configureAndWatch

2006-11-07 Thread Chris Cheshire
ttempts yield errors stating that I am trying to write to a closed appender and I have to redeploy the web app for it to work again. How do I fix this? Thanks Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comm

Re: Log file per application execution

2006-10-26 Thread Chris Dillon
James Stauffer gmail.com> writes: > Please post it to http://wiki.apache.org/logging-log4j/UsefulCode > On 10/25/06, Chris Dillon gmail.com> wrote: > > ... > > So as a quick hack, I subclassed the FileAppender and overrid the activateOptions() to check for backups. >

Re: Log file per application execution

2006-10-25 Thread Chris Dillon
tions() to check for backups. I does the job for me, backs up the files from xxx.log to xxx.log.1 up to a certain number of backups, then deletes the older ones. The code is far from beautiful (then again, I've seen worse ;D ), but should anyone be interrested, just drop me an email... Ch

Log file per application execution

2006-10-24 Thread Chris Dillon
appender that would fullfil our needs ? Thank you for reading Cheers Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Add appender programmatically after logger configured initially with PropertyConfigurator

2006-09-22 Thread chris derham
ll has the problem. I often find when doing this, that removing chunks of code hilights where the problem is. If you still can't find the problem, then post the small piece of code along with the similarly small property files, and maybe someone will be able to see where the problem is Ch

Filtering long log files and searching

2006-08-21 Thread chris derham
but what about adding a simple search from current position (or backwards for that matter) for a given string in a given column (or all columns). That would be really useful. Thanks for providing a great tool. It really helps. With the ability to search archives for messages at specific times, would IMHO be a really useful addition. Chris

Re: logging to a file in a rotating directory

2006-06-22 Thread Chris Cheshire
James, sorry for the slow reply. Thanks for posting this, it is *exactly* what I needed. :) Chris On 6/20/06, James Stauffer <[EMAIL PROTECTED]> wrote: Since it is really only useful for 1.2 (I thought 1.3 had something that would do that) I didn't think there was much point to cont

logging to a file in a rotating directory

2006-06-19 Thread Chris Cheshire
figure it to do this? Thanks Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: smtpappender not working in jboss

2006-06-16 Thread Chris Cheshire
that came with JBoss (4.0.3SP1) or replace it with 1.2.13, it does this. Chris On 6/15/06, Jacob Kjome <[EMAIL PROTECTED]> wrote: How about a link to the repository selector in the JBoss Wiki? Also, can we assume that you are using the logger "mycategoryname" to do the ERROR an

smtpappender not working in jboss

2006-06-15 Thread Chris Cheshire
uration is ok. I have posted this on JBoss forums but have had no luck there. Can anyone offer me some help here? Thanks, Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: log4j multithreading performance

2005-12-02 Thread Chris Berry
odebase is still in alpha. Cheers, -- Chris On 12/2/05, Endre Stølsvik <[EMAIL PROTECTED] > wrote: > > On Fri, 2 Dec 2005, Curt Arnold wrote: > > | > | On Dec 2, 2005, at 12:19 AM, Trenton D. Adams wrote: > | > > | > Could the optimizer move the "instanceIndicato

Re: threading issue with log4j

2005-11-23 Thread Chris Berry
SyslogAppender On 11/23/05, Paul Smith <[EMAIL PROTECTED]> wrote: > > Question: Which appender did you "add" when it decided to slow > things down? The file appender or the Syslog appender? > > On 23/11/2005, at 4:56 PM, Chris Berry wrote: > > > I see

Re: threading issue with log4j

2005-11-22 Thread Chris Berry
up for us before. We never saw it until we added another Appender?? But reading the code that doesn't appear to have anything really to do with it?? It seems that because we have a base Category (i.e "com" in com.mycompany) all of the logging is sync-ing on the same object. Thanks, --

threading issue with log4j

2005-11-22 Thread Chris Berry
solution to the problem?? Is there another more thread-smart implementation of Category available?? AFAIK, the cardinal rule of log4j is "logging must be efficient" -- and this certainly doesn't appear to be... Thanks, -- Chris public void callAppenders(LoggingEvent event) { int w

Configuring log4j hierarchially, on-the-fly

2005-09-15 Thread Chris Berry
l" ). This way I'm not reinventing the wheel, I get the full power of log4j, and I can simply point users at the log4j docs. Is this possible?? Are there any pieces of log4j that I might use to accomplish this?? Thanks much, -- Chris --

Re: Object renderers, re-entrant appenders

2005-02-24 Thread Chris Nash
w what re-entrancy can do, I should be able to recognize and avoid it next time. Thank you all for all your help. Chris Nash Lexmark International, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Object renderers, re-entrant appenders

2005-02-24 Thread Chris Nash
lution. Many thanks for your consideration Chris Nash Lexmark International, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

newbie question about using log4j along with other 3p products

2004-10-13 Thread Chris Garcia
Our IDE (JBoss) uses log4j, and a customer's API also uses log4j (1.2.8), so we're planning to use it for our custom code that will be mixing these both. The customer's API has a server side log4j config file. Anything we should watch for? Can we define a new log4j client side config file without

ClassCast exception for factory

2004-04-20 Thread Peake, Chris
I am trying to implement a new logger factory to get around a problem I posted earlier. I am failing with a classcast exception on the statment below: private ConversionLogger logger = (ConversionLogger) ConversionLogger.getInstance(this.getClass()); The ConverstionLogger and ConversionLoo

RE: Messages getting redirected to non related log file

2004-04-20 Thread Peake, Chris
the options for this file. Thanks, chris -Original Message- From: Sikha, Naresh [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 20, 2004 2:31 PM To: 'Log4J Users List' Subject: RE: Messages getting redirected to non related log file >Is the Repository(Hiearchy) the only app

RE: Messages getting redirected to non related log file

2004-04-20 Thread Peake, Chris
7;file' appender does not get reinited and thus is not updated. Also, the messages from the other module is now coming into my console window. Is the Repository(Hiearchy) the only approach? I am not in a 'web' situation, simply a standalone (call other pgm obviously). Thanks, chris

RE: Messages getting redirected to non related log file

2004-04-20 Thread Peake, Chris
or doConfigure():307, org.apache.log4j.PropertyConfigurator configure():315, org.apache.log4j.PropertyConfigurator ():93, com.fatwire.ca.extractor.Extractor getInstance():39, com.fatwire.ca.extractor.Extractor run():160, com.fatwire.ca.extractor.ExtractionManager$ExtractorThread -Original Message- From: Peake, Chris

Messages getting redirected to non related log file

2004-04-20 Thread Peake, Chris
appenders are all named differently. I can't seem to find the root cause. I've tried various releases of log4j. Any ideas? thanks, Chris