Skip to content

Releases: gonyyi/alog

v1.0.0 Release

19 Jul 21:35
eb8cf9b

Choose a tag to compare

This is a first 1.0.0 release.

// Create a tag "Disk"
// Create a tag "DB"
tagDisk := al.NewTag("Disk") 
tagDB := al.NewTag("DB") 

al.Info(tagDisk).Str("action", "reading disk").Write()
al.Info(tagDB).Str("id", "myID").Str("pwd", "myPasswd").Writes("Login") // Anything in `Write(string)` will be printed as `message`.
al.Info(tagDisk,tagDB).Int("status", 200).Writes("Login")
al.Info(tagDisk|tagDB).Int("status", 200).Writes("Logout") // tags can be used as `tagDisk|tagDB` or `tagDisk,tagDB` format

// Output:
// {"date":20210308,"time":203835,"level":"info","tag":["Disk"],"action":"reading disk"}
// {"date":20210308,"time":203835,"level":"info","tag":["DB"],"message":"Login","id":"myID","pwd":"myPasswd"}
// {"date":20210308,"time":203835,"level":"info","tag":["Disk","DB"],"message":"Login","status":200}
// {"date":20210308,"time":203835,"level":"info","tag":["Disk","DB"],"message":"Logout","status":200}

Added *logger.Log

09 Apr 18:17
6b8dc50

Choose a tag to compare

v0.8.3

Added *logger.Log

Tag now has method Has, Sub

07 Apr 15:31
156134e

Choose a tag to compare

v0.8.2

Update tag_test.go

0.8.1 release - NewWriterFn() added

06 Apr 18:38
a1d34ed

Choose a tag to compare

NewWriterFn() can be used for conditional outputs of logger such as certain tag and/or level to be recorded to different writers.

0.8.0 release

05 Apr 20:27

Choose a tag to compare

  • Fixed bug with ext.Formatter when Write("")
  • Added alog.Err type
  • Use Zerolog's AppendString (see appendString.go)
  • Err(string, error) now takes Err(error) and "error" will be used as a default key.
  • Write(string) now takes Write(...string) to be optional

Require arguments for *Logger.Write(string)

09 Mar 18:05

Choose a tag to compare

Previous varargs mislead how it supposed to work.

Use alog.Discard instead of io.Discard for backward compatibility

09 Mar 15:56
98a5f84

Choose a tag to compare

logger.Ext.Init() update to take Control's pointer, etc.

09 Mar 15:20
4240361

Choose a tag to compare

Changes in Ext method names. Updated readme.

09 Mar 04:16

Choose a tag to compare

Fix: Const UseDefault -> WithDefault

08 Mar 22:25
b2355fe

Choose a tag to compare

v0.7.3

Update logger_mode.go