Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Fix logging of errors #26

Closed
jodh-intel opened this issue Mar 22, 2018 · 0 comments
Closed

Fix logging of errors #26

jodh-intel opened this issue Mar 22, 2018 · 0 comments
Assignees

Comments

@jodh-intel
Copy link
Contributor

There are a few instances of logging errors using logrus which will result in a level=error field, but no error= field.

@jodh-intel jodh-intel self-assigned this Mar 22, 2018
jodh-intel added a commit to jodh-intel/ksm-throttler that referenced this issue Mar 22, 2018
Ensure all errors are logged using the `logrus.WithError()` API.
The current `logrus.Error(err)` calls will result in log messages
containing the following fields:

```
level=error msg="..."
```

Whereas using `logrus.WithError()` will result in the expected:

```
level=error error="..."
```

Fixes kata-containers#26.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
jodh-intel added a commit to jodh-intel/ksm-throttler that referenced this issue Mar 22, 2018
Ensure all errors are logged using the `logrus.WithError()` API.
The current `logrus.Error(err)` calls will result in log messages
containing the following fields:

```
level=error msg="..."
```

Whereas using `logrus.WithError()` will result in the expected:

```
level=error error="..."
```

Fixes kata-containers#26.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
jodh-intel added a commit to jodh-intel/ksm-throttler that referenced this issue Mar 22, 2018
Ensure all errors are logged using the `logrus.WithError()` API.
The current `logrus.Error(err)` calls will result in log messages
containing the following fields:

```
level=error msg="..."
```

Whereas using `logrus.WithError()` will result in the expected:

```
level=error error="..."
```

Fixes kata-containers#26.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
@sboeuf sboeuf removed the review label Apr 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants