change the pattern layout strings for the output appender to log the full
class name: I suspect the appender has a format like %c{1}; if you change
that to just %c you should get the entire class
■ DOUGLAS E. WEGSCHEID // Lead Analyst, Directories
(269) 923-5278 // douglas_e_wegsch
from log4j (or from the log4j
instance that you are fiddling with)? A good way to check is to message
with the layout and see if the log messages change when you change the
layout
■ DOUGLAS E. WEGSCHEID // LEAD ENGINEER
(269) 923-5278 // douglas_e_wegsch...@whirlpool.com
"A wrong note pla
at least one problem higher in the file (lines 27 and 31): too many XML
comment closes (-->)
-->
-->
good XML editor is recommended
■ DOUGLAS E. WEGSCHEID // LEAD ENGINEER
(269) 923-5278 // douglas_e_wegsch...@whirlpool.com
"A wrong note played hesitatingly is a
be willing to look at it, but it looks like you attached your web.xml
instead of the log4j.xml
■ DOUGLAS E. WEGSCHEID // LEAD ENGINEER
(269) 923-5278 // douglas_e_wegsch...@whirlpool.com
"A wrong note played hesitatingly is a wrong note. A wrong note played
with conviction is interpret
> In my Program i used DOMConfigurator.configure("D:/log4j.xml");
> now it throws new Error.
>
> log4j:WARN No appenders could be found for logger (com.log.ClassLogger).
> log4j:WARN Please initialize the log4j system properly.
> log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig
if you try this, you will find that it will work just fine, provided you
have a log4j.properties or log4j.xml around
■ DOUGLAS E. WEGSCHEID // LEAD ENGINEER
(269) 923-5278 // douglas_e_wegsch...@whirlpool.com
"A wrong note played hesitatingly is a wrong note. A wrong note played
Use MDC for the string?
■ DOUGLAS E. WEGSCHEID // LEAD ENGINEER
(269) 923-5278 // douglas_e_wegsch...@whirlpool.com
"A wrong note played hesitatingly is a wrong note. A wrong note played
with conviction is interpretation."
Charles Hache
07/18/2012 01:26 PM
Please respond to
&q
try running with -Dlog4j.debug, it'll tell you what information log4j is
really getting out of the config...
should log4j.appender.syslogAudit.Threshold=INFO have a lowercase 'T' in
it?
■ DOUGLAS E. WEGSCHEID // LEAD ENGINEER
(269) 923-5278 // douglas_e_wegsch...@whirlpool.co
root being set to ERROR will not block the Myclass DEBUG; the
more-specific Myclass logger setting overrides the root setting.
Have you actually tried this?
package com.pkg;
import org.apache.log4j.Logger;
import com.other.OtherClass;
public class MyClass {
static Logger logger = Logger.getL
> I want MyClass logs of DEBUG level and all other classes of ERROR in
> "log1.log" file as mentioned in logger "Log1".
> ...
> whereas if I set the level in appender
> "Log1" to DEBUG, I do get the DEBUG logs of Myclass in log1.log.
If you set the level of the Log1 appender to DEBUG, you say tha
slf4j list if you continue to have problems...
■ DOUGLAS E. WEGSCHEID // LEAD ENGINEER
(269) 923-5278 // douglas_e_wegsch...@whirlpool.com
"A wrong note played hesitatingly is a wrong note. A wrong note played
with conviction is interpretation."
tomm wrote on 04/11/2012 01:55:20 P
tomm wrote on 04/11/2012 11:55:59 AM:
> I got something pretty much the same.
try making a new project with >>exactly<< what I posted. Then we'll know
if it's your environment, or that specific project
tomm wrote on 04/11/2012 11:55:59 AM:
> I also
> added: org.apache.commons.logging.Log=org.apache.commons.logging.
> impl.Log4JLogger
> to commons-logging.properties to point commons-logging to log4j. Didn't
> help either.
>
> More ideas?
Have you tried creating a new project with just thes
TTP/1.1 200 OK [Date: Wed, 11 Apr
2012 12:28:02 GMT, Server: Apache/2.2.15 (Red Hat), Last-Modified: Mon, 16
May 2011 14:39:57 GMT, ETag: "1660006-129-4a365a1278f31", Accept-Ranges:
bytes, Content-Length: 297, Keep-Alive: timeout=15, max=100, Connection:
Keep-Alive, Content-Type: t
tomm wrote on 04/10/2012 05:06:20 PM:
> > The one odd thing I see is that there is a logger named "jobManager"
that
> > is configured. I don't see that in the log4 config you posted in a
> > previous response (see below). Are you sure the config file that is
being
> > loaded is the one yo
I'm not sure this will work, but may be worth exploring: use the slf4j
log4j adapter (so calls to log4j logging calls go to slf4j), and configure
slf4j to log to j.u.l.
■ DOUGLAS E. WEGSCHEID // LEAD ENGINEER
(269) 923-5278 // douglas_e_wegsch...@whirlpool.com
"A wrong note played he
you may want to consider piping stderr and stdout to the apache rotatelogs
program.
■ DOUGLAS E. WEGSCHEID // LEAD ENGINEER
(269) 923-5278 // douglas_e_wegsch...@whirlpool.com
"A wrong note played hesitatingly is a wrong note. A wrong note played
with conviction is interpretation."
is log4j necessary?
will
java -jar foo.jar > sysout.txt 2> syserr.txt
suffice?
■ DOUGLAS E. WEGSCHEID // LEAD ENGINEER
(269) 923-5278 // douglas_e_wegsch...@whirlpool.com
"A wrong note played hesitatingly is a wrong note. A wrong note played
with conviction is interpretation
etails, if needed.
■ DOUGLAS E. WEGSCHEID // LEAD ENGINEER
(269) 923-5278 // douglas_e_wegsch...@whirlpool.com
"A wrong note played hesitatingly is a wrong note. A wrong note played
with conviction is interpretation."
BRUNO MELLONI wrote on 01/12/2012 11:19:57
AM:
> I am not following
I have hit the same situation with software that requires use of Apahce
commons logging, I use slf4j (and have it feed log4j); it has adapters to
let you log from j.u.l and commons logging. I don't know if it's best
practice, but it certainly works.
■ DOUGLAS E. WEGSCHEID // LEAD ENG
ah. a good point. you probably just want the 2nd one:
-Dlog4j.configuration=file:/url/path/to/log4j.xml
you can just try it also (along with the -Dlog4j.debug=true suggested
previously)
■ DOUGLAS E. WEGSCHEID // LEAD ENGINEER
(269) 923-5278 // douglas_e_wegsch...@whirlpool.com
"A wrong
and Jacob's other posting is also helpful:
I quote:
-Dlog4j.defaultInitOverride=true
-Dlog4j.configuration=file:/url/path/to/log4j.xml
See more at...
http://logging.apache.org/log4j/1.2/manual.html#defaultInit
■ DOUGLAS E. WEGSCHEID // LEAD ENGINEER
(269) 923-5278 // douglas_e_w
uncomment the "log4j.appender" lines.
■ DOUGLAS E. WEGSCHEID // LEAD ENGINEER
(269) 923-5278 // douglas_e_wegsch...@whirlpool.com
"A wrong note played hesitatingly is a wrong note. A wrong note played
with conviction is interpretation."
Clement Jebakumar
11/20/2010 09:21
um... aren't you only logging messages of severity on up for most loggers?
log4j.rootCategory=ERROR,...
how are you creating and using your logger?
■ DOUGLAS E. WEGSCHEID // LEAD ENGINEER
(269) 923-5278 // douglas_e_wegsch...@whirlpool.com
"A wrong note played hesitatingly is a wro
I guess I don't understand the question: what are you wanting to do?
programmatically set properties on a custom logger, or do it in xml?
"custom" logger is a funny term: the configuration code handles
distributed and customer-written loggers identically...
Douglas E Wegscheid
can't you just cast the Logger to CustomLogger?
if (logger instanceof CustomLogger) {
CustomLogger c = (CustomLogger) logger;
c.customLoggersMethod();
}
Douglas E Wegscheid
Lead Technical Analyst, Whirlpool Corporation
(269)-923-5278
"A wrong note played hesitatingly is a wrong not
I suspect the lack of answer means that no one knows a way to do this,
except programmatically...
Douglas E Wegscheid
Lead Technical Analyst, Whirlpool Corporation
(269)-923-5278
"A wrong note played hesitatingly is a wrong note. A wrong note played
with conviction is interpret
nfiguring-log4j-and.html
Douglas E Wegscheid
Lead Technical Analyst, Whirlpool Corporation
(269)-923-5278
"A wrong note played hesitatingly is a wrong note. A wrong note played
with conviction is interpretation."
Chris
09/07/2010 04:42 PM
Please respond to
"Log4
Can you set log4j.debug=true in your properties? you will get a lof of
output to System.out, which will tell you how log4j is configuring itself.
btw, your config looks good. any chance that your mail system is doing
something to the message?
Douglas E Wegscheid
Lead Technical Analyst
log4j.configuration takes a URL, not a file path?
Douglas E Wegscheid
Lead Technical Analyst, Whirlpool Corporation
(269)-923-5278
"A wrong note played hesitatingly is a wrong note. A wrong note played
with conviction is interpretation."
fmarchioni
05/27/2010 09:10 AM
Please
even if this configuration gets picked up, it won't create the file. No
appenders are referenced anywhere.
Douglas E Wegscheid
Lead Technical Analyst, Whirlpool Corporation
(269)-923-5278
"A wrong note played hesitatingly is a wrong note. A wrong note played
with conviction is inte
d "A2".
log4j: Appender "A2" was already parsed.
log4j: Handling log4j.additivity.hibernate.objects=[null]
log4j: Finished configuring.
and you can see that the A2 appender is instantiated and set up.
Douglas E Wegscheid
Lead Technical Analyst, Whirlpool Corporation
(269)-923-5278
ahha. someone *has* done a JDBCAppender that will use an existing
datasource. Take a look at
http://www.boky.cc/2010/02/03/jdbcappender-for-log4j/
Douglas E Wegscheid
Lead Technical Analyst, Whirlpool Corporation
"A wrong note played hesitatingly is a wrong note. A wrong note played
JDBCAppender will let you leave off the "driver" parameter).
Douglas E Wegscheid
Lead Technical Analyst, Whirlpool Corporation
"A wrong note played hesitatingly is a wrong note. A wrong note played
with conviction is interpretation."
"Exposito Aguilera, Francisco"
one approach, use the XmlLayout, and then you can use your favorite XML
parsing API to parse the file.
Douglas E Wegscheid
Lead Technical Analyst, Whirlpool Corporation
(269)-923-5278
"A wrong note played hesitatingly is a wrong note. A wrong note played
with conviction is interpret
________
Från: Douglas E Wegscheid [douglas_e_wegsch...@whirlpool.com]
Skickat: den 19 april 2010 19:06
Till: Log4J Users List
Kopia: log4j-user@logging.apache.org
Ämne: Re: Display log in a web page?
we haven't implemented it yet, but will be in the next month or so: use
JdbcAppender,
we haven't implemented it yet, but will be in the next month or so: use
JdbcAppender, and write a web app to report against the database.
Douglas E Wegscheid
Lead Technical Analyst, Whirlpool Corporation
(269)-923-5278
"A wrong note played hesitatingly is a wrong note. A wrong note pl
"de.wota.segmentation.Bar" will inherit from "de.wota.segmentation",
"de.wota", and "de" but not "de.wota.MyApp".
Change your configuration to set up logging for "de.wota" instead of
"de.wota.MyApp".
Douglas E Wegscheid
a reasonable guess is that console i/o on Netbeans 6.7 is slow. if thei is
a problem in log4j, it would appear to be in the consoleappender,
fileappender seems to be ok.
perhaps querying someone that knows lot's about Netbeans would be a good
idea?
Douglas E Wegscheid
Lead Technical An
what is the relative performance of System.out.println on the two
platforms?
what is the relative performance of log4j when using a FileAppender?
Douglas E Wegscheid
Lead Technical Analyst, Whirlpool Corporation
(269)-923-5278
"A wrong note played hesitatingly is a wrong note. A wrong
are doing, it's hard to help from here.
what have you tried? what research have you done? googling for "apache fop
log4j" produces 79800 hits, the first page looks like it has many relevant
hits.
Douglas E Wegscheid
Lead Technical Analyst, Whirlpool Corporation
(269)-923-5
s the only piece that I am aware of
that would be platform/version specific. It would be simple for you to
test :)
Douglas E Wegscheid
Lead Technical Analyst, Whirlpool Corporation
(269)-923-5278
"A wrong note played hesitatingly is a wrong note. A wrong note played
with conviction is interpre
some additional possibilities:
- use jdbc logging to a central server/database.
- use a socket appender to send the data to the central server.
- use the JMSappender to send the data to the central server
Douglas E Wegscheid
Lead Technical Analyst, Whirlpool Corporation
(269)-923-5278
&q
esses (other syslog
daemons may also have this capability); configuring it to accept only from
127.0.0.1 would be almost as secure as just accepting messages from
/dev/log.
Douglas E Wegscheid
Lead Technical Analyst, Whirlpool Corporation
(269)-923-5278
"A wrong note played hesitatingly
"it does not work": no output? error message? exception? machine catches
on fire?
make sure that your syslog is set up to receive from the network (default
port udp port 514) , and not just /dev/log.
'hostname' is indeed the name of the machine running the syslog daemon?
if you have a chance to change the log file layout, use the XMLLayout.
It's unambiguous to parse.
parsing the other layouts can be a problem (think about the situation of
messages spanning multiple lines, or that have an exception trackback...)
Douglas E Wegscheid
Lead Technical An
system properties are set on the Java command line with the -D switch, not
with environment variables.
java -DLOG4J_NULL=nul .
power97 wrote on 05/20/2009 03:10:48 PM:
>
> It didn't work. Any ideas , here is my code:
>
> Windows .cmd file:
> set LOG4J_NULL=nul
>
> log4j.properties file
unix I still have
to
manually set the values so setting it in the log4j.properties maybe isn't
anymore work.
Douglas E Wegscheid wrote:
>
> how are you setting it now? inside your program, or in the
configuration?
>
> you have a number of options: programmatically you can det
program from ( set -DLOG4J_NULL=/dev/null and the ${LOG4J_NULL} in your
config.
options limited by imagination...
Douglas E Wegscheid
Lead Technical Analyst, Whirlpool Corporation
(269)-923-5278
"A wrong note played hesitatingly is a wrong note. A wrong note played
with conviction is interpret
on Unix-like systems, /dev/null works great.
Douglas E Wegscheid
Lead Technical Analyst, Whirlpool Corporation
(269)-923-5278
"A wrong note played hesitatingly is a wrong note. A wrong note played
with conviction is interpretation."
Michael Erskine
05/20/2009 10:06 AM
Please
this should be pretty straightforward: you can determine hostname with
InetAddress.getLocalHost(). after that, it's just code.
you probably won't get an address of "localhost" back, though. localhost
usually (always?) maps to 127.0.0.1...
Douglas E Wegscheid
Lead Technica
html
what have you tried? do you have specific questions?
Douglas E Wegscheid
Lead Technical Analyst, Whirlpool Corporation
(269)-923-5278
"A wrong note played hesitatingly is a wrong note. A wrong note played
with conviction is interpretation."
that posting a question is a waste of time is not a good way to
come across as helpful.
Douglas E Wegscheid
Lead Technical Analyst, Whirlpool Corporation
(269)-923-5278
"A wrong note played hesitatingly is a wrong note. A wrong note played
with conviction is interpretation."
John El
> One more dumb question for you. If you're so smart, where did I find
the
> set up for the fatal log? And why?
I would have had to agree with Bender's statement that logging with no
appenders makes the logging go nowhere, and I put together a test case to
make sure:
the program:
import or
you could, but you still have the problem of handling multi-line messages.
if you have the option to change layout, xmllayout is pretty foolproof...
Douglas E Wegscheid
Lead Technical Analyst, Whirlpool Corporation
(269)-923-5278
"A wrong note played hesitatingly is a wrong note. A wrong
doing this with an arbitrary layout would be quite daunting.
if you use XMLLayout, then reading the XML and doing what you want would
be quite simple.
Douglas E Wegscheid
Lead Technical Analyst, Whirlpool Corporation
(269)-923-5278
"A wrong note played hesitatingly is a wrong note. A
could the path for log4j.configuration be wrong, and it can't find your
config.
add -Dlog4j.debug=true, and it will tell you how it's loading it's config.
btw, you can only have one configuration. are you trying to use both
log4j.xsl.properties and log4j.pdf.properties?
Doug
it's not what I expect. If I see an error message that is marked as being
logged by class T1, I would expect to find the corresponding logging
statement in class T1 or a superclass, not a subclass
but that's just a style thing...
Douglas E Wegscheid
Lead Technical Analyst,
een the Thread.currentThread().getStackTrace() show up in Java5
(I've been using the StackTraceElement[] stack = new
Throwable().getStackTrace(); hack), and appreciate him sharing his idea.\
Douglas E Wegscheid
Lead Technical Analyst, Whirlpool Corporation
(269)-923-5278
"A wrong note pla
the subclass, you screw up the superclass'
logger (static class variables are shared with subclasses, yes?). static
loggers in a subclass/superclass situation are messy, I haven't been able
to figure out a good way to do static loggers in that siutation. Any
ideas?
Douglas E Wegscheid
http://marc.info/?l=log4net-dev&m=109344646600810&w=2
Douglas E Wegscheid
Lead Technical Analyst, Whirlpool Corporation
(269)-923-5278
"A wrong note played hesitatingly is a wrong note. A wrong note played
with conviction is interpretation."
"Kannan Ekanath" <[E
the same problem, but no solution. It does reference using a
log4j.appender.mail.smtp.starttls.enable property.
but that should get you started in your research!
Douglas E Wegscheid
Lead Technical Analyst, Whirlpool Corporation
(269)-923-5278
"A wrong note played hesitatingly is a wron
*why* do you need a separate file for each managed object?
Douglas E Wegscheid
Lead Technical Analyst, Whirlpool Corporation
(269)-923-5278
"A wrong note played hesitatingly is a wrong note. A wrong note played
with conviction is interpretation."
"Reza Razavipour" <
63 matches
Mail list logo