Skip to content

Commit

Permalink
fix: [CN-40] update zap handler documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
vpakhuchyi committed Feb 10, 2024
1 parent 09e83b7 commit e5b3ba1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ func main() {

```

## Censor handlers for loggers
## Censor handler for loggers

### Handler for `go.uber.org/zap`

Expand Down Expand Up @@ -291,7 +291,7 @@ func main() {
Note that due to the diversity of the `go.uber.org/zap` library usage, it's important to pay attention to how you use
it with the censor handler.

#### Glossary
#### Covered data

When using the logger with the censor handler, the following keywords are important: `msg`, `key`, and `value`:

Expand Down Expand Up @@ -645,17 +645,17 @@ That's why all the runes will be formatted to be displayed as int32 Unicode code
package main

import (
"log/slog"
"log/slog"

"github.com/vpakhuchyi/censor"
"github.com/vpakhuchyi/censor"
)

func main() {
var v rune = 'A'
var v rune = 'A'

slog.Info("Request", "payload", censor.Format(v))
// Here is what we'll see in the log:
//Output: `2038/10/25 12:00:01 INFO Request payload=65`
slog.Info("Request", "payload", censor.Format(v))
// Here is what we'll see in the log:
//Output: `2038/10/25 12:00:01 INFO Request payload=65`
}

```
Expand Down

0 comments on commit e5b3ba1

Please sign in to comment.