ozzo-log icon indicating copy to clipboard operation
ozzo-log copied to clipboard

A Go (golang) package providing high-performance asynchronous logging, message filtering by severity and category, and multiple message targets.

Results 9 ozzo-log issues
Sort by recently updated
recently updated
newest added

target := log.NewConsoleTarget() target.MaxLevel = log.ParseLevel(os.Getenv("LOG_LEVEL")) logger.Targets = append(logger.Targets, target)

Without this extra locks program was racing. F.ex.: when writing is not finished and Close() called. Also switched to sync.RWMutex.

Fix tests to not use the "log" prefix, as it makes impossible for a fork to create tests

```go target := log.NewFileTarget() target.FileName = "\"qweqw\"" l.logger.Targets = append(l.logger.Targets, target) l.logger.Open() err = logger.Open() if err != nil { panic(err) } // run my code ``` After running this...

P.S. And some thoughts about ``` logger.Open() defer logger.Close() ``` https://joeshaw.org/dont-defer-close-on-writable-files/

I want to ask to add it creating folders from config file if it is not exist. for example: "type": "FileTarget", "FileName": "c:/sed/1.log" the library creates c:\sed To rewrite localy...

许多 go package 都通过标准库 log 中的 Logger 输出日志,但可以设置 io.Writer 。 是否有可能通过虚拟出一个 io.Writer 来供标准库 log 中的 Logger 使用 ozzo-log 的相关特性(如过滤分流、日志标的等)?

感觉 info 之类的日志一般不需要记录调用栈,错误之类的才需要记录调用栈。 希望增加 MaxLevel 参数来控制什么级别开启调用栈。