Skip to content

Commit

Permalink
add logging policy documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
norswap committed Jan 15, 2024
1 parent 311c537 commit 36bc7a5
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,15 @@ cast send \
0x3fAB184622Dc19b6109349B94811493BF2a45362
```

## Documentation

See the [doc index](/docs/README.md).

- [OP Stack Primer](/docs/opstack.md)
- [Port Configuration](/docs/port-config.md)
- [Vocabulary](/docs/vocabulary.md)
- [Logging Policy](/docs/logging.md)


## Contributing (for developers building simple-op-stack rollup)

Expand Down
8 changes: 8 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# roll-op Documentation

First, read the [top-level README](/README.md).

- [OP Stack Primer](/docs/opstack.md)
- [Port Configuration](/docs/port-config.md)
- [Vocabulary](/docs/vocabulary.md)
- [Logging Policy](/docs/logging.md)
27 changes: 27 additions & 0 deletions docs/logging.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Logging Policy

The default logging policy for services (process that are supposed to keep running) is to rotate the
logs once they reach 3M in size. This can be configured via the `logrotate_max_size` option (takes a
number followed by a `k`/`M`/`G` suffix).

The logs are rotated up to 300 times (accounted separately per log file) before the oldest rotations
are removed. Rotations older than 14 days are also removed. This can be configured via the
`logrotate_count` and `logrotate_max_days` options.

Finally, you can override settings for individual log files. This is done by specifying logrotate
commands directly (cf. [manpage]). Here's an example of how you can do this:

```toml
# at BOTTOM of the file
[logrotate_overrides]
"l1_node.log" = [
"size 1M",
"rotate 10",
]
"l2_node.log" = [
"size 300k",
"nocompress",
]
```

[manpage]: https://linux.die.net/man/8/logrotate

0 comments on commit 36bc7a5

Please sign in to comment.