Reputation: 36756
How I do to the logging go to the Windows console (that black thing, CMD, COMMAND)? I'm trying with ConsoleAppender, but I don't if I doing it right.
private static ConsoleAppender appender = new ConsoleAppender(new PatternLayout());
private Logger database;
Log() {
BasicConfigurator.configure();
database = Logger.getLogger("DATABASE");
database.addAppender(appender);
}
EDIT:
first: this code is a sample, it is bigger than this
second: on the console of Netbeans works perfectly.
Upvotes: 1
Views: 1405