Skip to content

Conversation

@hiranya911
Copy link
Contributor

We wish to use SLF4J as the logging interface in the Admin SDK.

  • Replaced the Log class in the internal package with calls to SLF4J
  • Deprecated the logging interfaces in the database package. These will be removed in a future release.
  • Modified LogWrapper to log to SLF4J when available, and log to the old interface when not. This is a temporary solution to avoid the breaking change. When we remove the deprecated logging stuff in the future, we can get rid of this as well.
Copy link

@mikelehen mikelehen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a couple questions.

* diagnostic logging, and {@link Logger.Level#NONE NONE} to disable all logging.
*
* @param logLevel The desired minimum log level
* @deprecated Use SLF4J-based logging. This method will be removed in a future release.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there some way we can be more specific / helpful than "Use SLF4J-based logging" ? Maybe it would be something like "Use SLF4J-based logging (e.g. just add slf4j-simple to your classpath to log to STDERR)." ?

On that note, we'll want to communicate this change to the support folks as well so they know how to ask developers to provide logs going forward.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Updated the text and added a link to SLF4J user manual.

/**
* Legacy logging interface for database implementation. This class attempts to reconcile SLF4J
* with the old logging implementation of Admin SDK. When SLF4J is available, logs using that
* API. Otherwise falls back to the old logging implementation. This class will removed in a

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume we could just log to both but we're avoiding that because it would potentially result in duplicate logs for people? Perhaps worth spelling that out in the comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@hiranya911 hiranya911 assigned hiranya911 and unassigned mikelehen Jul 7, 2017
@hiranya911 hiranya911 merged commit f9b81d2 into master Jul 7, 2017
@hiranya911 hiranya911 deleted the hkj-logging-cleanup branch July 7, 2017 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants