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

Add go-fuse logger #864

Merged
merged 1 commit into from
Oct 16, 2023
Merged

Add go-fuse logger #864

merged 1 commit into from
Oct 16, 2023

Conversation

Kern--
Copy link
Contributor

@Kern-- Kern-- commented Oct 6, 2023

Issue #, if available:

Description of changes:
soci-snapshotter-gprc overrides the default logger to be a logrus logger with debug as the write level. If the snapshotter is invoked with --log-level debug, then logs from e.g. log.PrinLn are visibile.

go-fuse uses this logging method to output a complete transaction of fuse operations keeping track of each request/response with a unique id. The ID is only unique within a single server, so trying to parse the logs is ambiguous since you don't know which server a response corresponds to.

go-fuse recently added support for per-server loggers. This change uses that functionality to add the layer digest to the logs from each fuse server so request/response pairs can be unambiguously matched.

It also changes the log level of go-fuse logs to trace since there really is no debug reason for enabling them.

Testing performed:
make check && make test && make integration

I also manually ran the snapshotter with --log-level debug to make sure there are no go-fuse logs and then again with --log-level trace to see the logs.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

soci-snapshotter-gprc overrides the default logger to be a logrus logger
with debug as the write level. If the snapshotter is invoked with
`--log-level debug`, then logs from e.g. `log.PrinLn` are visibile.

go-fuse uses this logging method to output a complete transaction of
fuse operations keeping track of each request/response with a unique id.
The ID is only unique within a single server, so trying to parse the
logs is ambiguous since you don't know which server a response
corresponds to.

go-fuse recently added support for per-server loggers. This change uses
that functionality to add the layer digest to the logs from each fuse
server so request/response pairs can be unambiguously matched.

It also changes the log level of go-fuse logs to trace since there
really is no debug reason for enabling them.

Signed-off-by: Kern Walster <[email protected]>
@Kern-- Kern-- requested a review from a team as a code owner October 6, 2023 18:44
fs/fs.go Show resolved Hide resolved
@turan18 turan18 merged commit 104c68c into awslabs:main Oct 16, 2023
4 checks passed
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.

4 participants