mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-03-25 23:10:58 -04:00
tweak color env variable options
As noted in mylog's 2b1085c: Looks like both the GNU tools' --color argument and cargo's CARGO_TERM_COLOR expect always/never rather than on/off. Match that. Might as well understand off/no/false and on/yes/true also.
This commit is contained in:
parent
8ced3155e2
commit
1458d668d7
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
@ -3,6 +3,7 @@ on: [push, pull_request]
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
|
MOONFIRE_COLOR: always
|
||||||
RUST_BACKTRACE: 1
|
RUST_BACKTRACE: 1
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -46,8 +46,8 @@ Logging options are controlled by environment variables:
|
|||||||
[glog](https://github.com/google/glog) package) and `google-systemd` (a
|
[glog](https://github.com/google/glog) package) and `google-systemd` (a
|
||||||
variation for better systemd compatibility).
|
variation for better systemd compatibility).
|
||||||
* `MOONFIRE_COLOR` controls color coding when using the `google` format.
|
* `MOONFIRE_COLOR` controls color coding when using the `google` format.
|
||||||
It accepts `on`, `off`, or `auto`. `auto` means to color code if stderr
|
It accepts `always`, `never`, or `auto`. `auto` means to color code if
|
||||||
is a terminal.
|
stderr is a terminal.
|
||||||
* Errors include a backtrace if `RUST_BACKTRACE=1` is set.
|
* Errors include a backtrace if `RUST_BACKTRACE=1` is set.
|
||||||
|
|
||||||
If you use Docker, set these via Docker's `--env` argument.
|
If you use Docker, set these via Docker's `--env` argument.
|
||||||
@ -59,8 +59,8 @@ format:
|
|||||||
I20210308 21:31:24.255 main moonfire_nvr] Success.
|
I20210308 21:31:24.255 main moonfire_nvr] Success.
|
||||||
LYYYYmmdd HH:MM:SS.FFF TTTT PPPPPPPPPPPP] ...
|
LYYYYmmdd HH:MM:SS.FFF TTTT PPPPPPPPPPPP] ...
|
||||||
L = level:
|
L = level:
|
||||||
E = error
|
E = error; when color mode is on, the message will be bright red.
|
||||||
W = warn
|
W = warn; " " " " " " " " " " yellow.
|
||||||
I = info
|
I = info
|
||||||
D = debug
|
D = debug
|
||||||
T = trace
|
T = trace
|
||||||
@ -72,7 +72,7 @@ MM = minute
|
|||||||
SS = second
|
SS = second
|
||||||
FFF = fractional portion of the second
|
FFF = fractional portion of the second
|
||||||
TTTT = thread name (if set) or tid (otherwise)
|
TTTT = thread name (if set) or tid (otherwise)
|
||||||
PPPP = module path
|
PPPP = log target (usually a module path)
|
||||||
... = message body
|
... = message body
|
||||||
```
|
```
|
||||||
|
|
||||||
|
2
server/Cargo.lock
generated
2
server/Cargo.lock
generated
@ -1274,7 +1274,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "mylog"
|
name = "mylog"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/scottlamb/mylog#1406a8d794d799971e0e1079d5188d2dc339c584"
|
source = "git+https://github.com/scottlamb/mylog#2b1085cfb3bd0b1f2afe7d8085045d81858c0050"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"libc",
|
"libc",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user