TL logging API harmonization - Consistent with TF logging API by DEKHTIARJonathan · Pull Request #645 · tensorlayer/TensorLayer · GitHub
Skip to content

TL logging API harmonization - Consistent with TF logging API#645

Merged
DEKHTIARJonathan merged 1 commit into
masterfrom
logging_api_harmonization
May 22, 2018
Merged

TL logging API harmonization - Consistent with TF logging API#645
DEKHTIARJonathan merged 1 commit into
masterfrom
logging_api_harmonization

Conversation

@DEKHTIARJonathan

@DEKHTIARJonathan DEKHTIARJonathan commented May 22, 2018

Copy link
Copy Markdown
Member

This PR aims to make logging:

  • consistent with TF logging API
  • thread-safe

It has been highly inspired by https://www.tensorflow.org/api_docs/python/tf/logging

Now it is possible to do the followings:

import tensorlayer as tl

tl.logging.set_verbosity(tl.logging.DEBUG)
tl.logging.set_verbosity(tl.logging.INFO)
tl.logging.set_verbosity(tl.logging.WARN)
tl.logging.set_verbosity(tl.logging.ERROR)
tl.logging.set_verbosity(tl.logging.FATAL)

tl.logging.debug("This is a debug message")
tl.logging.error("This is an error message")
tl.logging.fatal("This is a fatal error message")
tl.logging.info("This is an information message")
tl.logging.warn("This is a warning message")

@DEKHTIARJonathan DEKHTIARJonathan force-pushed the logging_api_harmonization branch from dc4065f to ed8a4ab Compare May 22, 2018 13:41
@tensorlayer tensorlayer deleted a comment May 22, 2018
@tensorlayer tensorlayer deleted a comment May 22, 2018
@tensorlayer tensorlayer deleted a comment May 22, 2018
@tensorlayer tensorlayer deleted a comment May 22, 2018
@tensorlayer tensorlayer deleted a comment May 22, 2018
@tensorlayer tensorlayer deleted a comment May 22, 2018
@DEKHTIARJonathan DEKHTIARJonathan merged commit dcc1d03 into master May 22, 2018
@DEKHTIARJonathan DEKHTIARJonathan deleted the logging_api_harmonization branch May 22, 2018 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants