humanlogio/humanlog

Exposing Scan API to use humanlog as a library

Closed this issue · 2 comments

Hi @aybabtme , I was wondering if you could expose the Scan function and its dependencies(StdioSink and Config), which are currently internal. So that it can be used outside the module as a library. Lazygit currently uses the Scanner function from an older version of Humanlog. But as you know the in the latest version Scanner/Scan function is not usable outside Humanlog, since it has internal dependencies.

I was trying to package Humanlog for Debian as part of Lazygit packaging. Then noticed that the version differences. But in order to upgrade the Humanlog dependency in Lazygit we need to expose StdioSink and config. I'll be happy to send a PR, but would like to hear your suggestions and opinions first. Thanks! 😁

Sure I'm open to the idea. I don't think there's a particular reason why I moved these types into internal/.

I'll send a PR for moving sink outside internal/. Moving config is not necessary I think, since we can configure sink using SinkOpts.