Skip to content

Commit 0038f26

Browse files
authored
contributing: add note about log levels (#1345)
1 parent aff3b77 commit 0038f26

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

content/docs/community/contributing.md

+15
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
# cSpell:ignore zerolog
23
title: Contributing
34
lang: en-US
45
keywords: [pomerium, community, contributing, pr, code]
@@ -41,6 +42,20 @@ Here are some of the expectations we have of contributors:
4142
- [Best Practices for Maintainers](https://opensource.guide/best-practices/)
4243
- [Shrinking Code Review](https://alexgaynor.net/2015/dec/29/shrinking-code-review/)
4344

45+
### Logging
46+
47+
Pomerium uses the [zerolog](https://github.com/rs/zerolog) package for logging. Guidelines for log levels:
48+
49+
| Level | When to use |
50+
| --- | --- |
51+
| Panic | _Do not use._ Use Fatal instead. |
52+
| Fatal | For unrecoverable errors at startup, or extremely exceptional circumstances at normal runtime. |
53+
| Error | Something has failed, and an operator should know about it. |
54+
| Warning | _Do not use._ Use Info or Error instead. |
55+
| Info | An operator should want to see this during normal operation or routine inspection. |
56+
| Debug | Verbose operational information that might be useful during troubleshooting. |
57+
| Trace | Information that you would care about only when trying to understand code behavior/ordering/interaction. Intended for someone looking at or familiar with the code, not most end users. |
58+
4459
## Docs
4560

4661
Pomerium's documentation is available at [https://www.pomerium.io/docs](https://www.pomerium.io/docs). If you find a typo, feel a section could be better described, or have an idea for a totally new application or section, don't hesitate to make a pull request change. There are few ways you can do this.

0 commit comments

Comments
 (0)