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
Copy file name to clipboardExpand all lines: README.md
+8-5
Original file line number
Diff line number
Diff line change
@@ -43,13 +43,14 @@ $ npm install karl --production
43
43
for a production only installation (no tests, documentation, ...).
44
44
45
45
## Supported Node Versions
46
-
`Karl` supports `Node` versions 0.12 and later.
47
-
To use `Karl` with `Node` version < 4.0, you must start `node` with the `--harmony` flag.
46
+
`Karl` supports `Node` versions 4.7.1 and later.
47
+
It is only tested on LTS versions.
48
48
49
49
## Usage
50
50
```js
51
51
var karl =require('karl');
52
52
53
+
karl.trace("Are you spying on me?");
53
54
karl.debug("Everything looks fine.");
54
55
karl.info("Need some more info huh?");
55
56
karl.warn("Didn't you forget something?");
@@ -60,6 +61,7 @@ for a production only installation (no tests, documentation, ...).
60
61
Output:
61
62
62
63
```sh
64
+
{"timestamp":"2015-08-02T18:02:39.456Z","level":"TRACE","hostName":"<hidden>","process":{"name":"karltest","pid":26693},"message":"Are you spying on me?","fileName":"karltest.js","lineNumber":40,"functionName":"<anonymous>"}
{"timestamp":"2015-08-02T18:02:39.456Z","level":"INFO","hostName":"<hidden>","process":{"name":"karltest","pid":26693},"message":"Need some more info huh?","fileName":"karltest.js","lineNumber":42,"functionName":"<anonymous>"}
65
67
{"timestamp":"2015-08-02T18:02:39.456Z","level":"WARN","hostName":"<hidden>","process":{"name":"karltest","pid":26693},"message":"Didn't you forget something?","fileName":"karltest.js","lineNumber":43,"functionName":"<anonymous>"}
Karl catches any uncaught exception (see [Event 'uncaughtException'](https://nodejs.org/api/process.html#process_event_uncaughtexception)).
152
+
Karl catches any uncaught exception (see [Event 'uncaughtException'](https://nodejs.org/api/process.html#process_event_uncaughtexception)).
150
153
When such an exception occurs, Karl logs a fatal log message (including stack trace) and then gracefully shuts down the process by emitting a `SIGINT` signal.
0 commit comments