diff --git a/v2/log/README.md b/v2/log/README.md index 70b1ac28f2011e5a1ea80cc2e82eaf03536ad0ac..622946e074e88041a41109848dd34482a8b9bf68 100644 --- a/v2/log/README.md +++ b/v2/log/README.md @@ -99,13 +99,12 @@ together by various fields for investigatory purposes. ```go ctx := log.WithFields( - slog.String("project_id", "1234abc") - slog.String("some_field", "abc123") + slog.String(fields.GitLabUserName, "1234abc") ) logger.InfoContext(ctx, "hello world") -// emitted log line will contain the `project_id` and `some_field` fields alongside -// "hello world" +// emitted log line will contain the `gl_user_name` field alongside +// "hello world" - this is imported from the `fields` package. ``` ### Canonical Logger