1 | package de.uka.ipd.sdq.dsexplore.helper; |
2 | |
3 | import org.eclipse.core.runtime.CoreException; |
4 | import org.eclipse.debug.core.ILaunchConfiguration; |
5 | |
6 | public class LoggerHelper { |
7 | |
8 | /** Logger for log4j. */ |
9 | // private static Logger logger = |
10 | // Logger.getLogger("de.uka.ipd.sdq.dsexplore"); |
11 | |
12 | /** |
13 | * Setup log4j. FIXME: Does not really do what I want! |
14 | * |
15 | * TODO: Log in the console of the starting application, just as the simulation does. |
16 | * |
17 | * @param config SimuCom config which is queried for the logging settings |
18 | * @throws CoreException |
19 | */ |
20 | public static void initializeLogger(ILaunchConfiguration config) throws CoreException { |
21 | /* PatternLayout myLayout = new PatternLayout("%d{HH:mm:ss,SSS} [%t] %-5p %m [%c]%n"); |
22 | ConsoleAppender myAppender = new ConsoleAppender(myLayout); |
23 | if (config.getAttribute(SimuComConfig.VERBOSE_LOGGING, true)) |
24 | myAppender.setThreshold(Priority.DEBUG); |
25 | else |
26 | myAppender.setThreshold(Priority.WARN); |
27 | myAppender.setWriter(new PrintWriter(System.out));*/ |
28 | //BasicConfigurator.resetConfiguration(); |
29 | //BasicConfigurator.configure(); |
30 | //BasicConfigurator.configure(myAppender); |
31 | //logger.debug("Verbose logging enabled!"); |
32 | } |
33 | |
34 | } |