bamzi / jobrunner

Framework for performing work asynchronously, outside of the request flow
MIT License
1.04k stars 99 forks source link

Added custom logger structure. Fix #26 #27

Open akdilsiz opened 4 years ago

bamzi commented 4 years ago

There are many logging libraries, the zerolog might be great lib but I’m not comfortable forcing the choice at this stage.

What would a better approach be to introduce better loggings but not explicitly choosing the lib?

akdilsiz commented 4 years ago

The only reason why I used the zerolog lib was in order for testing. Therefore, if you like we can still use cron.Log interface to write a custom Logger without having to use any other log libraries.

As of right now, I'm currently removing zerolog, and adding a default logger as soon as I am done I will PR.

If you would like I can write the testcode while using multiple different logger libraries. What do you think?

vgarvardt commented 2 years ago

Almost the same can be achieved by using stdlib logger https://github.com/bamzi/jobrunner/pull/22 - it is not structured but allows capturing all the library logs using any implementation.