mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
docs: Move logging guidance to CONTRIBUTING
Keep logging and comment-style guidance in CONTRIBUTING.md and trim duplicate policy from the agent guide. On-behalf-of: SAP philipp.schuster@sap.com Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
This commit is contained in:
committed by
Rob Bradford
parent
a07097af1f
commit
466b5a8e08
@@ -36,11 +36,6 @@ reviewable, and compatible with the project's normal engineering constraints.
|
||||
comment with the invariants, and make sure the surrounding code upholds them.
|
||||
- Assume concurrency matters. Avoid races, unsynchronized shared state, and
|
||||
implicit ordering assumptions; prefer clear ownership and synchronization.
|
||||
- Keep docs and comments short and useful. Document non-trivial invariants at
|
||||
struct definitions and critical state transitions.
|
||||
- Logging should be minimal and high signal. Use `info!` for important normal
|
||||
state changes that matter in production; use `warn!` or `error!` only for
|
||||
abnormal conditions. Keep `debug!` for focused diagnostics.
|
||||
|
||||
### Build and Test Notes
|
||||
|
||||
|
||||
@@ -39,6 +39,10 @@ For new code, add documentation and comments where they **provide additional val
|
||||
|
||||
Comments should be concise and add additional context or information to the code.
|
||||
|
||||
Logging should be minimal and high signal. Use `info!` for important normal
|
||||
state changes that matter in production; use `warn!` or `error!` only for
|
||||
abnormal conditions. Keep `debug!` for focused diagnostics.
|
||||
|
||||
[Rust Style]: https://github.com/rust-lang/rust/tree/HEAD/src/doc/style-guide/src
|
||||
|
||||
## Basic Checks
|
||||
|
||||
Reference in New Issue
Block a user