Skip to content

Commit

Permalink
bump to v0.7.3
Browse files Browse the repository at this point in the history
  - improved error dumping in attrs
  - [logg/slog] a special locked version for entry printOut
  - upgraded hedzr/is
  • Loading branch information
hedzr committed Nov 1, 2024
1 parent 123708c commit 558522e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# HISTORY / CHANGELOG

- v0.7.3
- improved error dumping in attrs
- [logg/slog] a special locked version for entry printOut
- upgraded hedzr/is

- v0.7.1
- added ExtraPrintersI interface
- added RemoveWriter() apis
Expand Down
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ The abilities are:
- privacy enough: harden filepath, shorten package name (by `Lprivacypath` and `Lprivacypathregexp`); and implement `LogObjectMarshaller` or `LogArrayMarshaller` to security sensitive fields.
- better multiline outputs.

Since v0.7.3, a locking version of printOut added. This would take more safeties to splitted writer (if your writer had implemented `LevelSettable` interface to compliant with logg/slog's log level).

![image-20231107091609707](https://cdn.jsdelivr.net/gh/hzimg/blog-pics@master/uPic/image-20231107091609707.png)

### Chanages
Expand Down Expand Up @@ -482,18 +484,18 @@ Your writer can implement `LevelSettable` to handling the requesting logging lev
```go
package mywriter
import (
"logz" "github.com/hedzr/logg/slog"
"logz" "github.com/hedzr/logg/slog"
)
type myWriter struct {
level logz.Level
level logz.Level
}
func (s *myWriter) SetLevel(level logz.Level) { s.level = level } // logz.LevelSettable
func (s *myWriter) Write(data []byte) (n int, err error) {
switch(s.level) {
case logz.DebugLevel:
// ...
}
return
switch(s.level) {
case logz.DebugLevel:
// ...
}
return
}
```

Expand Down
4 changes: 2 additions & 2 deletions _examples/small/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ package main

const AppNameExample = "small" // appName for the current demo app

const appName = "logg/slog" // appName of package
const version = "v0.7.1" // version of package
const appName = "logg/slog" // appName of hedzr/logg package
const version = "v0.7.3" // version of hedzr/logg package | update it while bumping hedzr/logg' version

0 comments on commit 558522e

Please sign in to comment.