When I run my application from within Eclipse my debug output appears in the eclipse 'console' window. If I want to see this output in the dos window that opens when I run my application do I need to change the xml log4j config file ? The syntax seems a little cryptic so say the least.
Many thanks in advance.
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
Originally posted by David Garratt: The syntax seems a little cryptic so say the least.
If that's the most cryptic thing you ever run across, you're a VERY lucky indivudual! I don't think you'll have to change your configuration, but you will have to tell log4j to use that configuration with a command-line parameter like this:
I have a utility class which has a number of methods within it one of which is this :-
public static void initLogging() { DOMConfigurator.configure("xml/log4j.xml"); }
This is called a the start of my application.
Any debug messages are generated as example :-
public static void test() { final Logger logger = Logger.getLogger(MyTest.class);
logger.debug("something meaningful");
}
These messages appear in the Eclipse "console" window when I run from the IDE, but I was rather expecting to see them in the DOS window when the app is run from the desktop direct. I have "ECHO ON" at the start of my batch file.
Should I be doing some more coding in my initLogging routine.