Skip to content

Commit ad2d9c3

Browse files
committed
change absent method for logging to existing one
1 parent 1a6ff49 commit ad2d9c3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ if err != nil {
2525

2626
And, finally, handled by printing it to the log file:
2727
```go
28-
log.Errorf("Error: %s", err)
28+
log.Printf("Error: %s", err)
2929
```
3030

3131
It doesn't take long to find out that quite often this is not enough. There's little fun in solving the issue when everything a developer is able to observe is a line in the log that looks like on of those:
@@ -60,7 +60,7 @@ if err != nil {
6060
}
6161
```
6262
```go
63-
log.Errorf("Error: %+v", err)
63+
log.Printf("Error: %+v", err)
6464
```
6565

6666
An error message will look something like this:

0 commit comments

Comments
 (0)