charmbracelet / git-lfs-transfer

Server-side implementation of the Git LFS pure-SSH protocol
MIT License
52 stars 6 forks source link

feat: add logger interface #17

Closed aymanbagabas closed 11 months ago

aymanbagabas commented 11 months ago

Pass a custom logger to log messages

aymanbagabas commented 11 months ago

This is definitely an improvement. If you haven't already, I'd also suggest checking out logrus. It seems to be the de facto standard for logging in Go, and supports things like structured data. It's pluggable, you can use any logging backend you want with it. GitLab uses logrus, wrapped in their own wrapper.

I would avoid using logrus since there are many different go loggers out there and each has its interface, plus it would bloat the package. Perhaps we could make this Logger interface structured instead

KyleFromKitware commented 11 months ago

Perhaps we could make this Logger interface structured instead

Yes, I think that would be a good idea too, and then on GitLab's side we could simply add a Logrus backend for your Logger interface.

KyleFromKitware commented 11 months ago

Cc: @ashmckenzie

codecov[bot] commented 11 months ago

We're currently processing your upload. This comment will be updated when the results are available.