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: docs/help.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -3,22 +3,22 @@
3
3
4
4
If you run your Node.js process via [Systemd](https://www.freedesktop.org/wiki/Software/systemd/) and you examine your logs with [journalctl](https://www.freedesktop.org/software/systemd/man/journalctl.html) some data will be duplicated. You can use a combination of `journalctl` options and `pino-pretty` options to shape the output.
5
5
6
-
For example viewing the pretified logs of a process named `monitor` with `journalctl -u monitor -f | pino-pretty`, might output something like this:
6
+
For example viewing the prettified logs of a process named `monitor` with `journalctl -u monitor -f | pino-pretty`, might output something like this:
As you can see, the timestamp, hostname and pid are duplicated.
13
-
If you just want the bare pretified Pino logs you can strip out the duplicate items from the `journalctl` output with the `-o cat` option of `journalctl`:
12
+
As you can see, the timestamp, hostname, and pid are duplicated.
13
+
If you just want the bare prettified Pino logs you can strip out the duplicate items from the `journalctl` output with the `-o cat` option of `journalctl`:
14
14
```
15
15
journalctl -u monitor -f -o cat | pino-pretty
16
16
```
17
17
the output now looks something like this:
18
18
```
19
19
[1587706801902] INFO (6080 on nanopi): TT 21
20
20
```
21
-
Making the output even more human readble by using the pino-pretty options `-t` to format the timestamp and `-i pid, hostname` to filter out hostname and pid:
21
+
Make the output even more human readable by using the pino-pretty options `-t` to format the timestamp and `-i pid, hostname` to filter out hostname and pid:
0 commit comments