: 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
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 (
: 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.
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
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
+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
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
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
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.
> >
> &
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
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?
>
>
>
can't find
RendererMap.
Any ideas on how to get this code to work properly with the overlapping
classes?
Thanks,
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
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
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
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
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
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
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.
---
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
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 }
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]
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]
a specific workstation vs the whole application and bring the server to
a crawl while logging a few hundred workstations.
Thanks in advance.
Chris
a specific workstation vs the whole application and bring the server to
a crawl while logging a few hundred workstations.
Thanks in advance.
Chris
*** 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:
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
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
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]
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
offers this through exclusion
filters,
but were 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
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
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.
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
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
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
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
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
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
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
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
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]
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
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.
>
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
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]
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
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
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
figure it to do this?
Thanks
Chris
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
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
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]
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
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
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,
--
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
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
--
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]
lution.
Many thanks for your consideration
Chris Nash
Lexmark International, Inc.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
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
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
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
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
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
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
65 matches
Mail list logo