Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging guidelines draft #512

Merged
merged 13 commits into from
Sep 15, 2020
Merged

Logging guidelines draft #512

merged 13 commits into from
Sep 15, 2020

Conversation

stranger80
Copy link
Contributor

No description provided.

@stranger80 stranger80 marked this pull request as draft August 26, 2020 20:56
shadeofblue
shadeofblue previously approved these changes Aug 31, 2020
Copy link
Contributor

@shadeofblue shadeofblue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nicely summarized, nice 👍

filipgolem
filipgolem previously approved these changes Aug 31, 2020
Copy link
Contributor

@filipgolem filipgolem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good document.

```
do this:
```
[2020-08-27T07:56:22Z DEBUG yagna] Initializing GNT payment driver...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[2020-08-27T07:56:22Z DEBUG yagna] Initializing GNT payment driver...
[2020-08-27T07:56:22Z DEBUG yagna] Initializing GNT payment driver


**Audience:**
- Users

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is also very important for node owners/admins.

log this:

```
[2020-08-27T07:56:22Z ERROR yagna] E00342 - WASM ExeUnit DEPLOY: Error downloading remote file to temp folder '/tmp/yagna_data': File IO error: Path not found
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my experience of debugging yagna: the file name and line number where the error occurred is very important as it's ofter easier to just read the source code to find the problem. (I know you mentioned it in "Log entry content" section.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, albeit the error code indicated in this example serves this purpose: with a specific error code it should be fairly instantaneous to identify the location responsible for a particular issue (I'm conscious that providing file/line number may not be feasible for many dev platforms).

- **Grouping or correlating** attribute (attribute which allows to filter events related to a single command, activity, API request, etc.)
- Thread id
- Bespoke correlation id
- Log entry **description** (human readable, no linebreaks)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sometimes "no linebreaks" is opposite of "human readable"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, rewritten

@stranger80 stranger80 marked this pull request as ready for review September 5, 2020 17:51
@stranger80
Copy link
Contributor Author

Merged latest master state and added reference to logging guidelines from the SDP doc.

@stranger80 stranger80 merged commit 2e117d8 into master Sep 15, 2020
@@ -106,6 +106,10 @@ https://doc.rust-lang.org/1.0.0/style/README.html
To enforce formatting, code should be formatted using rustfmt tool (https://github.com/rust-lang/rustfmt).
To install it, run `rustup component add rustfmt` command. To format files in the working dictory, please run `cargo fmt` command.

### Logging Guidelines

The logging guidelines for Yagna component development can be found here: logging-guidelines.md.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this does not render as link

@tworec
Copy link
Contributor

tworec commented Sep 15, 2020

👍 good job guys! Thx!

@tworec tworec deleted the stranger80/logging-guidelines branch October 14, 2020 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants