Hi,
I'de like to know if you can define a file name that appends to its name
the current time stamp (I don't mean rolling by date - the
DailyRollingAppender is not good for me).
What I need is that if I define a name like: kuku.log I want actually
kuku_2004-11-24-12:19.log or kuku.log_2004-11
now them but check out this link to see all options for all types
of Appenders..
http://www.vipan.com/htdocs/log4jhelp.html
-----Original Message-
From: Yair Ogen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 24, 2004 8:50 AM
To: [EMAIL PROTECTED]
Subject: smart file name
Hi,
I'
?
At 02:50 PM 11/24/2004, Yair Ogen wrote:
>
>Hi,
>
>I'de like to know if you can define a file name that appends to its name
>the current time stamp (I don't mean rolling by date - the
>DailyRollingAppender is not good for me).
>
>What I need is that if I d
I've thiught about it, but when is try to put a variable on the file name it is
ignored. Please note I'm looking for a static decleration in my config file
that will get a dynamic value every time the file is created. i.e.
fileName="cat_{d}.log" or something like that.
-Original Message
: Ted Gittinger [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 24, 2004 5:42 PM
To: Log4J Users List
Subject: Re: smart file name
See if this thread helps you out.
http://www.mail-archive.com/log4j-user@logging.apache.org/msg01793.html
Yair Ogen wrote:
> The time stamp when the file is
ote that the choice of using "kuku" as a file name was yours,
certainly not mine. :-)
HTH,
At 06:43 AM 11/25/2004, Yair Ogen wrote:
>I've thiught about it, but when is try to put a variable on the file name
>it is ignored. Please note I'm looking for a static decleration i
Hi,
I need to configure a custom Legger that extends then log4j Logger.
I want users to code: Logger.getLogger, and get the custom logger.
I know how to do this in code, but this will require every developer to call
this code.
I want to find a way to this via the log4.properties file so if all
n Thu, Apr 2, 2009 at 2:15 PM, Bender Heri wrote:
> Already looked at the LoggerFactory?
> Heri
>
> -Ursprüngliche Nachricht-
> Von: Yair Ogen [mailto:yairo...@gmail.com]
> Gesendet: Donnerstag, 2. April 2009 10:13
> An: log4j-user@logging.apache.org
> Betreff
Do you type the thread name in your logs? To to add it and analyze the log
file. I have found in the past the in some not thread safe application to
events tries to write a log message at the same time resulting in only one
log message being written.
Can this be your case?
On Mon, Apr 13, 2009 a
He means this:
public class OfflineMethodsDelegate extends BaseDelegate {
private static Logger logger1 = Logger.getInstance("MyLogger1");
private static Logger logger2 = Logger.getInstance("MyLogger2");
public void method1(UserInfo uInfo)throws DAOException {
lo
same thing.
On Thu, Apr 16, 2009 at 5:57 PM, Vani Bandargal wrote:
>
>
> yaog wrote:
> >
> > In the log4j file add different logger definitions for MyLogger1 and
> > MyLogger2.
> >
>
> you mean In log4J.properties or in log4J.xml?
>
>
> yaog wrote:
> >
> > He means this:
> >
> >
> > public class
Ho about creating a Logger in ThreadLocal with a unique name that is based
on the thread name?
On Sat, May 2, 2009 at 5:53 PM, Kaspar Fischer wrote:
> Dear list,
>
> I am looking for a way to create a log file per thread (actually, per
> Quartz job that gets run).
>
> I've googled quite a bit an
Hi,
I can't say I tried this myself but let's assume you have this code:
public void run()
{
String id = ...; // thread name or whatever
Logger logger = ...; // Create a logger with a basename and the id
ThreadLocal loggerThreadLocal = new ThreadLocal();
loggerThreadLocal.set(logger);
t
I think the approach should be via the appender. you can try and extend it -
AFAIK only the appender can give you the file name.
On Mon, May 4, 2009 at 3:56 PM, wrote:
> Hi,
>
> I'm using log4j with a DailyRollingFileAppender. Now I want to add some
> reporting functions to the same application
This is already ava
On Wed, May 13, 2009 at 10:17 AM, Sindhu wrote:
>
> I have implemented DailyRollingFileAppender,but their is no control on the
> size of the log file.I would like to control the file size as wel.
>
> Recently i heard about rollingPolicy.when i used the same in my log4j.xml i
This is already available using: "timeAndSizeRollingAppender".
You can get it from:
http://www.simonsite.org.uk/
On Wed, May 13, 2009 at 10:17 AM, Sindhu wrote:
>
> I have implemented DailyRollingFileAppender,but their is no control on the
> size of the log file.I would like to control the fi
You can use TimaAndSizeRollingAppender from http://www.simonsite.org.uk
It works just like that.
On Fri, May 15, 2009 at 5:03 PM, wrote:
>
> Curt Arnold writes:
> > Actually surprised, I thought there was a upper limit on the
> > maxBackupIndex. If you have a high maxBackupIndex and a file ro
We use a transaction id which we put in MDC and print using the %X{MDC_KEY}
notation in the conversion pattern.
On Tue, Jun 2, 2009 at 12:57 AM, David Grigglestone wrote:
> Maybe I'm missing something in the API but I don't see API support for
> associating a unique (e.g. numeric) identifier to a
Did you look at the log4j Filter support?
On Tue, Jun 2, 2009 at 1:22 PM, collatz wrote:
>
> Hi there!
>
> I'm looking for an Appender which offers the functionality of the Daily
> Rolling File Appender plus one more thing: It must be able to log only
> Information containing a given keyword.
>
why not point commons-logging to log4j and use the log4j API for this?
On Tue, Jun 2, 2009 at 3:05 PM, Captain Haddock wrote:
> Thanks Yair
>
> That will work for log4j.
>
> Don't see any equivalent in commons-logging .. any thoughts there anyone?
>
>
> Y
use log4j.debug=true
On Tue, Jun 2, 2009 at 5:00 PM, Ashish Kulkarni wrote:
> HiI have an application which is installed in clustered weblogic
> environment, and for some reason i do not see any logs in the log file
> specified in File section
> I have defined my logger as below, i dont see any
are both applications writing to the same log file?
if so, log4j does not support this very well.
On Tue, Jun 16, 2009 at 3:57 PM, Mortal wrote:
>
>
>
> Matt Brown-20 wrote:
> >
> > How do you know that log4j.info is the culprit - that the application is
> > blocked there?
> >
> > Can you take a
log4j is thread safe and should handle the concurrency efficiently.
I suggest you place tour OrderId in the log message using MDC.
On Sat, Jun 20, 2009 at 12:12 PM, benedikt herudek <
benedikt.heru...@gmail.com> wrote:
> Hi,
>
> we are intending to use log4J in a call center: we have around 100
of whole file for one
> session,
> no building of queues I assume ... ? ... :-)
>
> regards
>
> Benedikt
>
>
> On Sun, Jun 21, 2009 at 8:36 AM, Yair Ogen wrote:
>
> > log4j is thread safe and should handle the concurrency efficiently.
> > I suggest you place
Why not use a regular property file?
Then when you to update the file you can load the changes automatically
using the "PropertyConfigurator.configureAndWatch" mechanism.
On Sun, Jun 21, 2009 at 11:41 AM, Preetam Palwe wrote:
> Hello all,
>
>
>
> I have successfully configured log4j in my stan
Did you try running log4j with debug and see it reveals anything?
use -Dlog4j.debug=true
On Wed, Jun 24, 2009 at 10:30 AM, Arica wrote:
>
> Hi, Allen
>
> I added some threads to do the infinite loop in my source codes for
> testing,
> the CPU went to very high because of the inifinite loop. I tr
AFAIK log4j always uses the system time, BUT you can manipulate the time
being printed in the log file itself by using the log4j extras package and
the EnhancedPatternLayout.
On Fri, Jul 10, 2009 at 11:20 AM, Brenner Rene wrote:
> Hello all
>
> I understand, that log4j uses an absolute time and
instead of differntiation based on root logger do it based on different
packages. This way you can easily have package A write to file A with INFO
and package B write to file B at DEBUG.
On Sun, Jul 12, 2009 at 3:01 AM, Lucas Vickers wrote:
> Hello,
> Excuse my simple question as I am new to tomc
log4j under Tomcat is known to be "fishy" regarding class path.
Are you sure this suggestion works?
On Mon, Jul 13, 2009 at 10:27 AM, Jacob Kjome wrote:
> You have to deploy log4j.jar in both common/lib as well as WEB-INF/lib of
> each
> app. Tomcat will use the one in common/lib and each webap
please look at the extension supplied here:
http://www.simonsite.org.uk
It supports rolling by size and or by date as well as supports archiving.
On Wed, Jul 15, 2009 at 8:11 AM, Andrew Thorburn wrote:
> I'm fairly sure this isn't possible, but I figured I should check, just in
> case.
>
> Curr
I would suggest NDC or MDC.
On Tue, Aug 11, 2009 at 6:12 PM, sukesh jain wrote:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Hi all,
>
> I searched the Bugzilla repository and also the log4j manual, with the text
> "additional fields/info/properties" and "loggingEvent" but still did not
> found
> any pointers
I think MDC can really help because it is per thread and can be used with
out any extension to log4j, just add to your pattern in config file and set
in code when ever relevant.
On Tue, Aug 11, 2009 at 7:16 PM, sukesh jain wrote:
>
> Hi,
>
> My problem is some what similar to one mentioned in th
I though of something like this:
public void testmethod()
{
MDC.put("compName", componentName1);
MDC.put("classification", classification1);
logger.info(msg);
}
this does not resolve your issue?
On Wed, Aug 12, 2009 at 12:16 PM, sukesh jain wrote:
>
> Hi,
>
> But MDC requires that you know the
are you sure you are setting your props before log4j is loaded?
from the error looks like log4j did not read these props.
On Thu, Oct 22, 2009 at 8:45 AM, m.harig wrote:
>
> hello all
>
> am creating a log file using log4j , my log4j.properties setup is
>
> log4j.appender.RFA.File=${PATH}/$
did you try calling "activateOptions" method on the appender?
On Thu, Oct 29, 2009 at 12:07 PM, Mate Gulyas wrote:
> Dear All!
>
> I encountered a problem I do not really see how to resolve. I want to
> assign
> a unique port for every instance of an object I have, but I am not able to
> assign
do you have log4j extras jar in your classpath?
On Mon, Nov 16, 2009 at 3:42 PM, Pat Farrell wrote:
> In another thread, it was suggested that I convert from using
>
> PatternLayout to EnhancedPatternLayout
>
> so I changed all occurances of PatternLayout to EnhancedPatternLayout in
> my log4j.p
are you using hot deploy on Tomcat?
which version of log4j are you using?
On Wed, Apr 7, 2010 at 3:19 PM, Shahnaz Ali wrote:
> Hi,
>
> We have IVR application running on tomcat web application server on Redhat
> linux OS, using Log4J. This is a mission critical server application with
> good am
Hot deploy is when you load a new version of a war for example while the
server is still running. This triggers a chain of init actions on the server
side.
I see from the logs the doGet method in the servlet caused a init of log4j
configuration.
try looking in that direction. I think this should
Hi,
Can I use log4j to:
1. prevent the log file from being deleted while process that writes to it
is still running?
2. make the log file read only to others so only the writing application can
modify it?
Thanks,
Yair
Are you using log4j-extras?
On Mon, May 10, 2010 at 12:02 PM, Huber Christian (IT-DIWA) <
christian.hu...@swisslife.de> wrote:
> Actually no, NDC and MDC are referenced in the layout by %x and %X i would
> like to use the conversion pattern %properties as it is explained in the
> javadoc of the E
I am trying to extend log4j2.
I created my own configuration factory that is loaded just fine. In there I
give it a default pattern with some new converters.
I created a converter with the needed annotations. However, seems that the
plugin manager is not picking these up. Only plugins that exis
)
-Mensaje original-
De: Yair Ogen (yaogen) [mailto:yao...@cisco.com] Enviado el: jueves, 17 de
julio de 2014 14:43
Para: log4j-user@logging.apache.org
Asunto: Converter Plugin not loaded
I am trying to extend log4j2.
I created my own configuration factory that is loaded just fine. In
ResourceLoader
loader) that use DataInputStream with no apparent documentation on how this
input stream should be composed.
Best Regards,
Yair Ogen
-Original Message-
From: Remko Popma [mailto:remko.po...@gmail.com]
Sent: Thursday, July 17, 2014 16:03
To: Log4J Users List
Subject: Re
mechanism is not extension friendly.
Best Regards,
Yair Ogen
-Original Message-
From: Jaime Sastre [mailto:jsas...@globalavl.com]
Sent: Thursday, July 17, 2014 16:20
To: Log4J Users List
Subject: RE: Converter Plugin not loaded
I will try to do it bw today and tomorrow.
From what I see in
rated-sources\annotations
Best Regards,
Yair Ogen
-Original Message-
From: Remko Popma [mailto:remko.po...@gmail.com]
Sent: Thursday, July 17, 2014 16:30
To: Log4J Users List
Subject: Re: Converter Plugin not loaded
On Thu, Jul 17, 2014 at 10:24 PM, Yair Ogen (yaogen)
wrote:
> In
or doesn't contain a main...
Catch 22?
Best Regards,
Yair Ogen
-Original Message-----
From: Yair Ogen (yaogen)
Sent: Thursday, July 17, 2014 16:55
To: 'Log4J Users List'
Subject: RE: Converter Plugin not loaded
I missed that.
Added to my pom - should running mvn package
ain a main method with
appropriate signature.
org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor.main([Ljava.lang.String;)
-> [Help 1]
Best Regards,
Yair Ogen
W: (+972) (0) 2-589-4919
M: (+972) (0) 54-566-4919
-Original Message-
From: Jaime Sastre
ethod. Perhaps you are not running with the released 2.0
version?
Best Regards,
Yair Ogen
W: (+972) (0) 2-589-4919
M: (+972) (0) 54-566-4919
-Original Message-
From: Jaime Sastre [mailto:jsas...@globalavl.com]
Sent: Thursday, July 17, 2014 17:21
To: Log4J Users List
Subject: RE: Conv
sm)
I think that I did not do a proper build when I switched to 2.0 or somehow my
jar was cached, it looks fine now
I can send you my small project if you wish I got an appender and a layout
-Mensaje original-
De: Yair Ogen (yaogen) [mailto:yao...@cisco.com]
Enviado el: jueves, 17 de jul
The manual still references the maven exec plugin. That should be removed, no?
My problem was that I didn't enable annotation processing in Intellij.
Works fine now, thanks.
Best Regards,
Yair Ogen
W: (+972) (0) 2-589-4919
M: (+972) (0) 54-566-4919
-Original Message-
From:
File --> Settings --> compiler --> Annotation Processors - check the box
labeled: "Enable annotation processing".
I then urn 'mvn package' within Intellij.
Best Regards,
Yair Ogen
W: (+972) (0) 2-589-4919
M: (+972) (0) 54-566-4919
-Original M
I am using log4j2.1. any reason this flag is set to true by default? It is very
expensive (cpu wise) and AFAIK is something usually set by the pattern (i.e.
display source file and source line).
Copied from "LoggerConfig" Source:
private boolean includeLocation = true;
so if I don't override this is on, and I indeed this this consuming CPU in
profiling.
Am I missing something here?
We are using async and calcLocation is the exact method we've seen in the
profiler.
When initiation the logger config properly - i.e. the flag set to false - the
calc method disappeared.
at
please).
What version are you using?
Gary
On Mon, Dec 1, 2014 at 10:18 AM, Yair Ogen (yaogen)
wrote:
> We are using async and calcLocation is the exact method we've seen in
> the profiler.
>
> When initiation the logger config properly - i.e. the flag set to
> false
Gary Gregory
wrote:
> It looks like you'd dropped the message thread from your reply (don't
> do that please).
>
> What version are you using?
>
> Gary
>
> On Mon, Dec 1, 2014 at 10:18 AM, Yair Ogen (yaogen)
> wrote:
>
> > We are using async and calc
20:53
To: Log4J Users List
Subject: Re: includeLocation = true by default in LoggerConfig
Aha!
Can we take a look at the source for this extension?
Remko
Sent from my iPhone
> On 2014/12/02, at 1:26, "Yair Ogen (yaogen)" wrote:
>
> I am using a custom extension of the asyn
57 matches
Mail list logo