use my own logging package

This supports formats that I find more useful; one that mimicks the Google
glog package, and one that is similar but adapted for the systemd journal.
This commit is contained in:
Scott Lamb
2017-03-26 00:01:48 -07:00
parent c3cffb510b
commit bfc0e2abe8
14 changed files with 51 additions and 194 deletions

View File

@@ -220,7 +220,9 @@ been done for you. If not, Create
--sample-file-dir=/var/lib/moonfire-nvr/sample \
--db-dir=/var/lib/moonfire-nvr/db \
--http-addr=0.0.0.0:8080
Environment=RUST_LOG=info
Environment=TZ=:/etc/localtime
Environment=MOONFIRE_FORMAT=google-systemd
Environment=MOONFIRE_LOG=info
Type=simple
User=moonfire-nvr
Nice=-20
@@ -249,10 +251,12 @@ and `systemctl` may be of particular interest.
# Troubleshooting
While Moonfire NVR is running, logs will be written to stdout. The `RUST_LOG`
environmental variable controls the log level; `RUST_LOG=info` is recommended.
If running through systemd, try `sudo journalctl --unit moonfire-nvr` to view
the logs.
While Moonfire NVR is running, logs will be written to stdout. The
`MOONFIRE_LOG` environmental variable controls the log level;
`MOONFIRE_LOG=info` is the default. `MOONFIRE_FORMAT` controls the
logging style; options are `google` (default, like the Google glog package)
or `google-systemd` (formatted for the systemd journal). If running through
systemd, try `sudo journalctl --unit moonfire-nvr` to view the logs.
If Moonfire NVR crashes with a `SIGSEGV`, the problem is likely an
incompatible version of the C `ffmpeg` libraries; use the latest 2.x release