comparison mde/setup/logger.d @ 178:62aa8845edd2

Coloured log output to the console.
author Diggory Hardy <diggory.hardy@gmail.com>
date Tue, 15 Sep 2009 10:36:37 +0200
parents 9f035cd139c6
children
comparison
equal deleted inserted replaced
177:af40e9679436 178:62aa8845edd2
19 * Any module finding the logger is not set up early enough should import this 19 * Any module finding the logger is not set up early enough should import this
20 * module. This module should not import any other mde modules. 20 * module. This module should not import any other mde modules.
21 *****************************************************************************/ 21 *****************************************************************************/
22 module mde.setup.logger; 22 module mde.setup.logger;
23 23
24 import mde.setup.LogLayout;
24 import tango.util.log.Log; 25 import tango.util.log.Log;
25 import tango.util.log.AppendConsole; 26 import tango.util.log.AppendConsole;
26 27
27 static this () { 28 static this () {
28 // Set up the logger temporarily (until pre-init): 29 // Set up the logger temporarily (until pre-init):
29 Logger root = Log.root; 30 Logger root = Log.root;
30 debug root.level(Logger.Trace); 31 debug root.level(Logger.Trace);
31 else root.level(Logger.Info); 32 else root.level(Logger.Info);
32 root.add(new AppendConsole); 33 root.add(new AppendConsole (new LayoutTimerColour()));
33 } 34 }