lotusdblabs/lotusdb

log in lotusdb

roseduan opened this issue · 12 comments

investigate the common used log package in Golang, and choose one for our project.

main goals:

  • lighweight
  • fast
  • simple to use
wnz27 commented

i think map be zap

i think map be zap

zap is a too huge project?

wnz27 commented

i think map be zap

zap is a too huge project?

more light weight?

i could choose glg to investigate log, how do i participate?

i could choose glg to investigate log, how do i participate?

investigate the commonly used log and collect their features

ok i will search for some package

cpu: 12th Gen Intel(R) Core(TM) i7-12650H
BenchmarkStandardLog
BenchmarkStandardLog-16 453703 2448 ns/op 64 B/op 1 allocs/op
BenchmarkZeroLog
BenchmarkZeroLog-16 457500 2498 ns/op 0 B/op 0 allocs/op
BenchmarkZapLog
BenchmarkZapLog-16 5814438 196.3 ns/op 130 B/op 1 allocs/op
BenchmarkOneLog
BenchmarkOneLog-16 461516 2397 ns/op 88 B/op 2 allocs/op

i would like to use zerelog as log package for its zero memory allocation. in additionm, zerolog has more simple api to use although zap is the fastest package. is there other requirement?

Seems like zap is a better choice.

wnz27 commented

I think the base component can define a interface, the project use this interface, and we impl it use zap first, if we use other log package implement it later an we can compare them.

wnz27 commented

I think the base component can define a interface, the project use this interface, and we impl it use zap first, if we use other log package implement it later an we can compare them.

@roseduan

I think the base component can define a interface, the project use this interface, and we impl it use zap first, if we use other log package implement it later an we can compare them.

good idea

wnz27 commented

@roseduan i done this: #82, may be you can assign to me.