Phus Lu

Results 134 comments of Phus Lu

My benchmark very similar with #201 , but I only test small json object. So I just copy @dgrr result below ``` BenchmarkFastJSONSmall-8 11265998 483 ns/op 0 B/op 0 allocs/op...

Oh yeah, "eloquent way", yes, I try find it but haven't found a good way so I wrote my own one May I recommend below `ConsoleWriter` way? ```go // Default...

I added netip support in my logging lib in https://github.com/phuslu/log/commit/7a25b6ac1e899c8a41dbdcb0eef5264befcba50b I think it worth a look.

I think it's hard in zerolog because its console writer unmarshal input to map[string]interface{}. I re-wrote a zerolog-like logger and a new console writer, the example for your requirement is...

replace `*Event` with `Event` among logger interfaces(use buf pool instead of event pool) then we could prevent this error by a flag. But it may not worth.

A ha, I used zerolog in long term ago, this problem and this (issue 252) and this (issue 213) also suffer me. Finally i wrote yet another structure logger and...

Time formatting is the heaviest thing for loggers, so i exposes [runtime.walltime](https://golang.org/pkg/runtime/?m=all#walltime) and use [loop unroll](https://en.wikipedia.org/wiki/Loop_unrolling) to speeds it. And the optimize result is nice.

I have re-wrote a zerolog like logger and have a new console writer with performance improvment. https://github.com/phuslu/log/blob/master/console.go#L15-L24 said, ```go // ConsoleWriter parses the JSON input and writes it in a...

I wrote the new console writer contains a completed `Formatter`, https://pkg.go.dev/github.com/phuslu/log#FormatterArgs an example in https://github.com/phuslu/log#formatting-console-writer

understood. Which mechanism is prefered? 1. reuse exsiting option, e.g. `--log-opt plugin=/usr/local/bin/nerdctl-inerternal-logging` 2. introduce a new option, e.g. `--log-plugin /usr/local/bin/nerdctl-inerternal-logging` or `--log-shim` 3. introduce a config file?