On Fri, Jan 16, 2009 at 9:17 AM, Jay wrote:
> Hi Matt
>
> Went through the archive for last two months. I couldn't find any related
> threads to this topic. Could you forward me the details of the thread, that
> you were referring, please ?
>
> TIA
>
> --- On Fri, 1/16/
There was an example of this a couple weeks ago on the mailing list.
The recommended solution then was to set System.out and System.err to
a new PrintStream that you control. Then you read lines from the
PrintStream and log messages using log4j.
Matt
On Jan 16, 2009, at 8:41 AM, Jay wro
There's no property on the AsyncAppender that I know of called 'blocking'.
What are yout trying to accomplish with this property?
On Thu, Jun 26, 2008 at 3:32 PM, Adam Mitchell <[EMAIL PROTECTED]>
wrote:
> I'm trying to disable blocking in the AsyncAppender, but get this message
> on
> init:
>
>
You can create your own custom object renderer that will properly render the
whole stack trace. This renderer will need to be included in the log4j
config and be available on the classpath when log4j initializes.
On Wed, Apr 23, 2008 at 3:19 PM, Robert Pepersack <
[EMAIL PROTECTED]> wrote:
> Hel
You could create your own Layout class. While you loose some of the
flexibility of the PatternLayout class you can perform any message
formatting/encoding. The Layout class takes a LogEvent and returns the
formatted string. It might also be possible to extend the PatternLayout.
Matt
On Tue, Apr
Try moving your 'ASYNC' appender definition after all the other appender
definitions. This might be causing your error as none of the other appenders
have been created yet.
Also as a side note, I'd recommend using instead of .
Matt
2008/2/21 Cosette Kamakian <[EMAIL PROTECTED]>:
> The proble
>
>
>
>
>
>
>
>
>
>
>
>
>
>
To expand on Orko's comment, the code to do this would look something like:
// to get a logger level as a string
public String getLoggerLevel(String loggerName) {
return Logger.getLogger(loggerName).getLevel().toString();
}
// to set a logger level as a string
public void setLoggerLevel(String
You need to extend one of the layout classes and add in getters and setters.
The header and footer in Layout only return null - indicating no
header/footer.
On Nov 15, 2007 7:43 PM, Satish Musunuru <[EMAIL PROTECTED]>
wrote:
> Hi,
> How can I set the header for DailyRollingFileAppender
> progra
Can you also post your log4j properties file? My guess is that the log
levels are not correct or that appenders are not attached appropriately.
Matt
On Nov 14, 2007 2:22 AM, msg2ajay <[EMAIL PROTECTED]> wrote:
>
> hi friends,
> I am new to log4j . i have written
> [CODE]
>
> - lo
To reset an entire configuration you need something like this:
public void reloadLog4J() {
LogManager.resetConfiguration();
DOMConfigurator.configure("log4j.xml");
}
Unfortunately, even the DOMConfigurator.configureAndWatch() only does an
incremental reload.
Matt
On Nov 13, 2007 3:58
Loggers can be named anything you want them to be. Traditionally they're
named after the class to aid with debugging, etc. You don't have to
specifically create a logger for each class. If at the top of every class
you had a line like -
private static final Logger logger = Logger.getLogger("foo");
I'm working on an app where we have a decorator Log4JRunnable class that
used to wrap runnables submitted to a thread pool. It retrieves a copy of
the MDC from the submitting thread (code included below). The problem that I
am running into is that occasionally a ConcurrentModificationException is
b
PropertyConfigurator only reads property files. To read an xml config you
need to use the DOMConfigurator. Another option would allow log4j to
statically initialize itself (your config file needs to be on the class
path).
On Nov 8, 2007 4:30 PM, <[EMAIL PROTECTED]> wrote:
> Here's my log4j-specif
Did you try setting the level of the root logger/all loggers to OFF?
On Nov 7, 2007 8:03 AM, Phillip Mills <[EMAIL PROTECTED]> wrote:
> For performance reasons, I would like to disable log4j logging entirely in
> a
> Java EE application, but I haven't stumbled on the magic formula yet.
>
> I've t
I'm not a 100% for sure about how log4j gets the class info, but I believe
it retrieves the previous value from the stack.
So if your class/method that was performing logging was Foo/foo, normally
the stack would look something like:
Logger.log(xx)
Foo.foo(xx)
...
However with your intermediary
I'm not super familiar with the java.util.logging but
java.util.logging.Handler is roughly equivalent to org.apache.log4j.Appender.
One option would be to create a custom Handler that repackages the
java.util.logging.LogRecord as a org.apache.log4j.LoggingEvent. This seems
like something that would
If you want to make struts not log info messages use:
log4j.logger.org.apache.struts=WARN, stdout
If you want to disable struts logging entirely use:
log4j.logger.org.apache.struts=OFF, stdout
On 10/17/07, Pamarthi, Ramakrishna <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> My application logging the
Where are you pulling the passwords from? Are you using an NDC/MDC?
If the passwords are logging directly by your application - i.e. something
like:
logger.debug("password = " + password);
Then you should look at changing the log statements.
On 10/15/07, John Smith <[EMAIL PROTECTED]> wrote:
>
gt; for %5p [%c] [%C.%M] (%F:%L) - %m%n format:
> >
> > ERROR [test.first.Another] [test.first.Another.main] (Another.java:
> > 19) - error message
> > ERROR [test.first.Another] [test.first.Another.testAMethod]
> > (Another.java:34) - another error Msg
> >
>
&
%C.%M] (%F:%L) - %m%n format:
>
> ERROR [test.first.Another] [test.first.Another.main] (Another.java:19) -
> error message
> ERROR [test.first.Another] [test.first.Another.testAMethod] (Another.java:34)
> - another error Msg
>
> Matthew Kemp <[EMAIL PROTECTED]> wrote: One solution (although
One solution (although I'm not sure about the performance impacts) would be
to create loggers that are children of the class logger. For example if you
had a class 'Bar' in package 'foo', the your logger for the class would be '
foo.Bar'. If Bar has a method bar() and baz() you could create a logge
Can you clarify your setup? Do you mean that all three are deployed in the
same container/VM? Or they're in three different containers/VM's but they're
all going to the same log file. Also is there one log4j config or three
seperate ones?
On 9/7/07, Drinkwater, GJ (Glen) <[EMAIL PROTECTED]> wrote:
Are you saying that you want one logger.log() call to print the entire stack
trace? Or do you want logger.log() calls exiting and entering each method?
On 8/31/07, Faine, Mark R. (MSFC-NNM04AA02C)[SAIC] <[EMAIL PROTECTED]>
wrote:
>
>
> I'd like for Log4J to print the log messages with some sort of
You still need to attach the appender to a logger. Try adding this line to
you log4j properties file:
log4j.rootLogger=info, file
On 8/30/07, Siamak Sarmady <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I have a simple log4j program.
>
> When I use the "stdout log messages" section of my log4j.proper
There is some overhead with parsing the xml/building the DOM, but since that
only happens when the config is loaded the impact should be minimal. Once
log4j is setup there is no difference.
On 8/29/07, simon litwan <[EMAIL PROTECTED]> wrote:
>
> hi all
>
> is there any difference re performance wh
I think it would be useful to implement your solution as a configurable
parameter of an FileAppender. By default this delayFileCreation parameter
would be false so log4j performs the same as now. However you could set the
delayFileCreation parameter to true to cause the FileAppender to wait until
i
--- Administrative commands for the log4j-user list ---
I can handle administrative requests automatically. Please
do not send them to the list address! Instead, send
your message to the correct command address:
To subscribe to the list, send a message to:
<[EMAIL PROTECTED]>
To remove your ad
Setting additivity to false should fix your problem. I'm not sure about the
properties log4j config, but in log4j.xml it's just an attribute on the
logger.
On 8/3/07, Daniel Henninger <[EMAIL PROTECTED]> wrote:
>
> Hi folk!
>
> I'm trying to switch my project to log4j and am running into an issue
Thanks for your response.
First, I didn't realize that the XML include mechanism worked with log4j
yet. I will give that a try and see if I can get it working. Do you know if
it should work with version 1.2.9 - I know the current version is 1.2.14 but
I'm stuck with the older version right now. A
going to be a major roll-your-own project?
Thanks,
Matthew Kemp
31 matches
Mail list logo