umoci icon indicating copy to clipboard operation
umoci copied to clipboard

logs: migrate away from github.com/apex/log

Open cyphar opened this issue 1 year ago • 3 comments

While we picked apex/log because it had nicer formatting than logrus, it seems that apex/log is no longer maintained and we should probably move to something else (if for no other reason than apex/log still uses github.com/pkg/errors wrapping which we stopped using in #556).

cyphar avatar Nov 28 '24 00:11 cyphar

What do you think about moving to https://github.com/rs/zerolog? I'd be happy to assist in the migration.

dleviminzi avatar Dec 11 '24 21:12 dleviminzi

I saw that but wasn't sure if https://github.com/uber-go/zap is better maintained or not (though according to zap themselves, zerolog is faster).

It would be nice to pick something that is going to be maintained for as long as possible so we don't have to do more migrations in the future (logrus wins out on this metric imho).

Also, let me take a look at how the log formatting looks before starting to work on a port 😅

cyphar avatar Dec 12 '24 05:12 cyphar

Maybe we should have an internal logging driver that gets mapped to a different logger. This would also make it nicer to use umoci as a library in other large projects such as in https://github.com/lxc/incus/pull/1880.

cyphar avatar Apr 03 '25 16:04 cyphar