Skip to content

Commit 705f8ca

Browse files
authored
Merge pull request #27 from cdr/refactor
Refactor
2 parents 427712f + 8ac2ae9 commit 705f8ca

File tree

12 files changed

+281
-163
lines changed

12 files changed

+281
-163
lines changed

README.md

+3-11
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ go get go.coder.com/slog
1818
- Minimal API
1919
- Tiny codebase
2020
- First class [context.Context](https://blog.golang.org/context) support
21+
- First class [testing.TB](https://godoc.org/go.coder.com/slog/slogtest) support
2122
- Beautiful logging output by default
2223
- Multiple adapters
23-
- First class [testing.TB](https://godoc.org/go.coder.com/slog/slogtest) support
2424

2525
## Example
2626

@@ -35,19 +35,11 @@ slogtest.Info(t, "my message here",
3535
xerrors.Errorf("wrap2: %w",
3636
io.EOF),
3737
)),
38-
slog.Component("test"),
3938
)
40-
41-
// t.go:55: 2019-09-13 19:27:15.336 [INFO] <examples_test.go:47> my message here {"field_name": "something or the other", "some_map": {"nested_fields": "wowow"}} ...
42-
// "error": wrap1:
43-
// go.coder.com/slog_test.TestExample
44-
// /Users/nhooyr/src/cdr/slog/examples_test.go:53
45-
// - wrap2:
46-
// go.coder.com/slog_test.TestExample
47-
// /Users/nhooyr/src/cdr/slog/examples_test.go:54
48-
// - EOF
4939
```
5040

41+
![Example output screenshot](https://i.imgur.com/o8uW4Oy.png)
42+
5143
## Design justifications
5244

5345
See [#9](https://github.com/cdr/slog/issues/9)

0 commit comments

Comments
 (0)