Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 693 Bytes

README.md

File metadata and controls

23 lines (19 loc) · 693 Bytes

logging

flexible logging framework supporting various "adaptors" (used throughout core haxe libraries)

basic usage

LogManager.instance.addAdaptor(new ConsoleLogAdaptor({
    levels: [LogLevel.Info, LogLevel.Error], // will show all logs by default
    formatter: new MySuperFormatter(), // defaults "DefaultFormatter"
    packages: ["foo.bar"] // will show all packages by default
}));

(note that each log adaptor can have its own settings)

var log = new Logger(SomeClass);
log.info("some string", someObject);
log.error("some string", someObject);
log.warn("some string", someObject);
log.debug("some string", someObject);
log.data("some string", someObject);