aboutsummaryrefslogtreecommitdiff
path: root/test/basic.js
blob: 90aadd68382b5883679b3122b0a05afe9502f559 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
if (typeof require === "function") {
    require("cobalt-log");
}

var co = new Cobalt.Console({
    loggers : [
        new Cobalt.Logger.JsConsole({
            formatter     : Cobalt.Formatter.Token,
            formatterOpts :  {
              formatString : "[{{_level}}] {{message}} {{customParam}}"
            }
        })
    ]
})

// TODO: Do this whole thing with tellurium.

co.log("Log - Normal");
co.debug("Warn - Normal");
co.info("Info - Normal");
co.notice("Notice - Normal");
co.warn("Warn - Normal");
co.error("Error - Normal");

var logObject = co.extendLog({
    message : "Extended Log Object",
    customParam : "<3"
});

co.log(logObject);
co.debug(logObject);
co.info(logObject);
co.notice(logObject);
co.warn(logObject);
co.error(logObject);