You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
outputFormat: textFormat, // You can customise the default output format
39
+
})
40
+
.addSink(consoleSink({
41
+
colorOptions: { info: green } // You can customise the log level colors
42
+
}))
43
+
.addSink(fileSink("log.ndjson"), jsonFormat); // You can set a custom format per sink
28
44
29
45
logger.debug("Debug"); // Ignored due to the minimumLevel
30
46
logger.info("This is {type} logging in {program}", "Structured", "Deno");
@@ -34,7 +50,6 @@ const num = 1;
34
50
const array = ["a", "b", "c"];
35
51
36
52
logger.warn("Numbers work: {number} as well as arrays: {arr}", num, array);
37
-
38
53
```
39
54

40
55
@@ -44,7 +59,7 @@ DSL uses it's own form of string formatting, similar to Serilog in C#. The synta
44
59
```ts
45
60
logger.info("Hello {name}, this is another {variable}", "First", 2);
46
61
```
47
-
where `"First"` and `2` are substituted into `{name}` and `{variable}` respectively. With the default console sink, the names don't really matter however they help readability of the format and with more complex sinks, for example a JSON sink, they could be used as property names.
62
+
where `"First"` and `2` are substituted into `{name}` and `{variable}` respectively. With the default console sink, the names don't really matter however they help readability of the format and with more complex formats, for example a JSON format, they could be used as property names.
0 commit comments