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
Make error!() logs shorter, label log location, fix warnings (#79)
* Make error!() logs shorter, label log location, fix warnings
* Add JSON log support via slog-bunyan; Add code location flag
* README: Document logging options, agent.rs: make plain logs default
* bin/agent.rs: Fill bunyan "name" field, print version before startup
* Move version/cwd information to src/agent.rs
* Cargo.toml: Bump version for v2.1.0 release
Copy file name to clipboardExpand all lines: README.md
+8-1Lines changed: 8 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,9 +28,16 @@ The agent takes a single `--config` CLI option, pointing at
28
28
there, containing a minimal set of mandatory options and documentation
29
29
comments for optional settings. **The config file must exist.**
30
30
31
+
### Logging
31
32
The logging level can be configured at runtime
32
33
through the `RUST_LOG` environment variable using the standard
33
-
`error|warn|info|debug|trace` levels.
34
+
`error|warn|info|debug|trace`.
35
+
36
+
#### Plain/JSON logging
37
+
By default, pyth-agent will print plaintext log statements. This can be switched to structured JSON output with `-l json`.
38
+
39
+
#### Code location in logs
40
+
For debugging purposes, you can specify `-L` to print file/line information with each log statement. This option is disabled by default.
34
41
35
42
### Key Store Config Migration [v1.x.x LEGACY]
36
43
Pyth agent v2.0.0 introduces a simplified program and mapping key configuration. This breaking change alters how you define program/mapping key options in your agent config:
0 commit comments