Skip to content

Commit 7da28cb

Browse files
authored
Merge pull request #2 from joomcode/log-typo-fix
change absent method for logging to existing one
2 parents 1a6ff49 + ad2d9c3 commit 7da28cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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)