]>
Commit | Line | Data |
---|---|---|
db6bc3cb BB |
1 | if (typeof require === "function") { |
2 | require("cobalt-log"); | |
3 | } | |
4 | ||
5 | var co = new Cobalt.Console({ | |
6 | loggers : [ | |
7 | new Cobalt.Logger.JsConsole({ | |
8 | formatter : Cobalt.Formatter.Token, | |
9 | formatterOpts : { | |
10 | formatString : "[{{_level}}] {{message}} {{customParam}}" | |
11 | } | |
12 | }) | |
13 | ] | |
14 | }) | |
15 | ||
16 | // TODO: Do this whole thing with tellurium. | |
17 | ||
18 | co.log("Log - Normal"); | |
19 | co.debug("Warn - Normal"); | |
20 | co.info("Info - Normal"); | |
21 | co.notice("Notice - Normal"); | |
22 | co.warn("Warn - Normal"); | |
23 | co.error("Error - Normal"); | |
24 | ||
25 | var logObject = co.extendLog({ | |
26 | message : "Extended Log Object", | |
27 | customParam : "<3" | |
28 | }); | |
29 | ||
30 | co.log(logObject); | |
31 | co.debug(logObject); | |
32 | co.info(logObject); | |
33 | co.notice(logObject); | |
34 | co.warn(logObject); | |
35 | co.error(logObject); |