Closed
Description
Some code I am working with take level string:
- Add flag : Llevel
- Add function OutputL:
OutputL(calldepth int, level, s string) error
outputl(calldepth int, level, s string) error
I have worked on log4go and nxlog4go for few years. The 3rd log alway face three problem:
- The interface function. More in stdlog, more need to be modified.
- Override Output function and replace with 3rd formatter.
- Building and using own Writer easy.
After compare few solutions, I found:
The level type should be string. It is better than int.
Do not implement too much interface functions in std log. Let the 3rd log do it.
Do not implement level filter in std log. Let the 3rd log do it.
New OutputL function receives the level string and writes it to the beginning of the log line.