Skip to content

Commit

Permalink
chore: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
rholshausen committed May 10, 2022
1 parent 4ec5788 commit 6b3c0ca
Showing 1 changed file with 8 additions and 42 deletions.
50 changes: 8 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,48 +84,14 @@ If the plugin is going to run in an environment that does not allow automatic do
3. Change the `downloadUrl` entry in the plugin manifest to point to a location that the file can be downloaded from.
4. Install the correct version of the protoc compiler as an operating system package. It must then be on the executable path when the plugin runs. For instance, for Alpine Linux this will need to be done as the downloaded versions will not work.

## Configuring logging

_NOTE: The logging was switched to the Rust tracing crate instead. Currently, log entries for tracing events will not be logged to the log file, but only to standard out._

The plugin will log to both standard output and a file (plugin.log) in the plugin installation directory. Common Rust library entries
for debug and trace levels will be filtered out. The log level will be set by the `LOG_LEVEL` environment variable that
is passed into the plugin process (this should be set by the framework calling it).

The logging can be configured using a YAML file (log-config.yaml) in the plugin installation directory. For documentation
on the file format, see [Log4rs](https://github.com/estk/log4rs).

An example file which enables trace level logs for the plugin:

```yaml
appenders:
stdout:
kind: console
file:
kind: file
path: "plugin.log"
encoder:
pattern: "{d(%Y-%m-%dT%H:%M:%S%Z)} {l} [{T}] {t} - {m}{n}"
root:
level: warn # This will be replaced at runtime with the current logging level
appenders:
- stdout
- file
# set some of the common Rust libraries to info level to reduce noise at debug/trace
loggers:
h2:
level: info
hyper:
level: info
tracing:
level: warn
tokio:
level: info
tokio_util:
level: info
mio:
level: info
```
## Logging

_NOTE: Since 0.1.3, the logging was switched to the Rust tracing crate and a log configuration file is no longer supported._

The plugin will log to both standard output and two files (log/plugin.log.* and log/plugin.log.json.*) in the plugin
installation directory. Each file will be rolled per day and be suffixed with the current date. The JSON log file will
be formatted in the [bunyan format](https://github.com/trentm/node-bunyan).The log level will be set by the `LOG_LEVEL`
environment variable that is passed into the plugin process (this should be set by the framework calling it).

## Supported features

Expand Down

0 comments on commit 6b3c0ca

Please sign in to comment.