From 3fa3756936b2bc88d640c9b04b3c030c99bd8913 Mon Sep 17 00:00:00 2001 From: Timofey Ilinykh Date: Mon, 23 Aug 2021 20:14:25 +0300 Subject: [PATCH 1/2] Add logging recommendations Signed-off-by: Timofey Ilinykh --- CONTRIBUTING.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 959386e13f..4d4b9e0f2e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,6 +15,7 @@ - [Debugging](#debugging) - [Metrics](#metrics) - [Code style](#code-style) + - [Logging](#logging) - [Commit and Pull Request message](#commit-and-pull-request-message) - [Signature](#signature) - [Changelog](#changelog) @@ -49,6 +50,7 @@ Following is a rough outline for the contributor's workflow: - Create a topic branch from where to base the contribution. - Make commits of logical units. +- Make sure your code is clean and follows the [code style and logging guidelines](#code-style). - Make sure the commit messages are in the [proper format](#commit-and-pull-request-message). - Make sure the changes are covered by [reasonable amount of testing](#testing). - Push changes in a topic branch to a personal fork of the repository. @@ -151,6 +153,13 @@ k8gb project is using the coding style suggested by the Golang community. See th Please follow this style to make k8gb easy to review, maintain and develop. Run `make check` to automatically check if your code is compliant. +### Logging + +k8gb project is using the [zerolog](https://github.com/rs/zerolog) library for logging. +Please make sure to follow the zerolog library concepts and conventions in the code. +Try to use [contextual logging](https://github.com/rs/zerolog#contextual-logging) whenever possible. +Pay attention to [error logging](https://github.com/rs/zerolog#error-logging) recommendations. + ## Commit and Pull Request message We follow a rough convention for PR and commit messages, which is designed to answer two questions: what changed and why. From d27088464b86da83a5dc5a06c647d20400975077 Mon Sep 17 00:00:00 2001 From: Timofey Ilinykh Date: Mon, 23 Aug 2021 23:57:39 +0300 Subject: [PATCH 2/2] Upddate formatting Signed-off-by: Timofey Ilinykh --- CONTRIBUTING.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4d4b9e0f2e..e83956b848 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -156,9 +156,10 @@ Run `make check` to automatically check if your code is compliant. ### Logging k8gb project is using the [zerolog](https://github.com/rs/zerolog) library for logging. -Please make sure to follow the zerolog library concepts and conventions in the code. -Try to use [contextual logging](https://github.com/rs/zerolog#contextual-logging) whenever possible. -Pay attention to [error logging](https://github.com/rs/zerolog#error-logging) recommendations. + +- Please make sure to follow the zerolog library concepts and conventions in the code. +- Try to use [contextual logging](https://github.com/rs/zerolog#contextual-logging) whenever possible. +- Pay attention to [error logging](https://github.com/rs/zerolog#error-logging) recommendations. ## Commit and Pull Request message