TODO.md 1.1 KB

TODO

Setup adapters to be named

To be possible to rewrite configuration instead of adding everytime on

Logger.setup(require('hlogger.conf'));

Rearrange the format better, keep it together

create logger chains as in:

var log = Logger.createLogger("log1");
var log2 = log.createLogger("log2");

resulting in name: " [0:log1.log2 -LVL- message +0.2ms/0]

create loggers from configuration " no point doing that we can create new loggers based on name Logger.createLogger("c1.log"); Logger.createLogger("c1.log.app");

Feature 2

Create named adapters so we could load in json config using a file watcher maybe

{

"writer" : {
    FileWriter: {
        "ansi":off
    }
    console: {
    }
},
"adapter" : [
    {
        levels:["ERROR","WARN"],
        match: ".*",
        writers: "FileWriter","console"
    }
]

}

Simplify config as well only wrapper needed

{

"adapterFile" {
    ansi:off,
    "levels":["ERROR","WARN"],
    match: ".*",
    writer: {
        name: "FileWriter",
        options: {
            file: "",
            ansi: false
        }
}
"console": {
    ansi:on,
    "levels":["ERROR","WARN","INFO","VERBOSE"],
    match: ".*",
    writer: "Console"
}

},