Skip to content

Improve logging and document approach & configuration clearly #39

@ches

Description

@ches

On #38 a logger object was added for the package, but then removed in favor of considering it later where it could receive focused discussion. This issue is a reminder to do that!

The library currently has a dependency on grizzled-slf4j and it's being imported, but I only see it being used for one debug call currently 😄 Grizzled appears to be a simple wrapper with some nice properties, though, and using its trait support is very non-intrusive, almost leaves nothing to discuss code-wise.

I think we should:

  • Affirm that grizzled-slf4j suffices and maintainers are happy with it.
  • Judiciously add some more logging where it is helpful. The Grizzled wrapper makes levels that are turned off inexpensive.
  • Document configuration for users in the README. This is essentially delegated to standard SLF4J means (providing your own "binding", concrete logger implementation), but we should briefly summarize and give pointers to how that works.

We're currently including the slf4j-simple binding as a dependency—this is probably overly opinionated/limiting since it only logs to stderr and at INFO level and above. Operators usually want more choice than that: any believer in 12-Factor app tenets will want stdout, many orgs have log aggregation conventions based on syslog, or files with collectors, etc.

Generally the idea with SLF4J is that libraries don't ship any binding, they just use the facade and leave it to applications to provide a chosen, configured binding, then all their SLF4J-enabled libraries will use it. It defaults to no-op if none is provided. So, the Keen client probably shouldn't have slf4j-simple as a dependency.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions