Skip to content
Snippets Groups Projects
Commit 6acb0f75 authored by a.croix's avatar a.croix
Browse files

Change ConsoleHandler to StreamHandler

parent feac5008
No related branches found
No related tags found
No related merge requests found
...@@ -2,9 +2,10 @@ package be.cylab.java.wowa.training; ...@@ -2,9 +2,10 @@ package be.cylab.java.wowa.training;
import java.io.IOException; import java.io.IOException;
import java.util.List; import java.util.List;
import java.util.logging.ConsoleHandler;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import java.util.logging.SimpleFormatter;
import java.util.logging.StreamHandler;
/** /**
* @author CYLAB * @author CYLAB
...@@ -24,7 +25,7 @@ public final class Example { ...@@ -24,7 +25,7 @@ public final class Example {
public static void main(final String[] args) throws IOException { public static void main(final String[] args) throws IOException {
Logger logger = Logger.getLogger(Trainer.class.getName()); Logger logger = Logger.getLogger(Trainer.class.getName());
logger.setLevel(Level.INFO); logger.setLevel(Level.INFO);
ConsoleHandler handler = new ConsoleHandler(); StreamHandler handler = new StreamHandler(System.out, new SimpleFormatter());
logger.addHandler(handler); logger.addHandler(handler);
TrainerParameters parameters = new TrainerParameters( TrainerParameters parameters = new TrainerParameters(
logger, 100, 60, 10, TrainerParameters.SELECTION_METHOD_RWS, logger, 100, 60, 10, TrainerParameters.SELECTION_METHOD_RWS,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment