diff options
author | zelig <viktor.tron@gmail.com> | 2014-06-25 23:38:42 +0800 |
---|---|---|
committer | zelig <viktor.tron@gmail.com> | 2014-06-25 23:38:42 +0800 |
commit | 6465e4c3fd21e7002e5870069c51755bd2c66df5 (patch) | |
tree | 41bdc50d483cc8a6bc102542782f28bfa39c0f25 | |
parent | e75f7ae3301bb66ca6d4e9c099c6a14bbe2be418 (diff) | |
download | go-tangerine-6465e4c3fd21e7002e5870069c51755bd2c66df5.tar go-tangerine-6465e4c3fd21e7002e5870069c51755bd2c66df5.tar.gz go-tangerine-6465e4c3fd21e7002e5870069c51755bd2c66df5.tar.bz2 go-tangerine-6465e4c3fd21e7002e5870069c51755bd2c66df5.tar.lz go-tangerine-6465e4c3fd21e7002e5870069c51755bd2c66df5.tar.xz go-tangerine-6465e4c3fd21e7002e5870069c51755bd2c66df5.tar.zst go-tangerine-6465e4c3fd21e7002e5870069c51755bd2c66df5.zip |
update doc: list levels and show usage of named print methods
-rw-r--r-- | ethlog/README.md | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ethlog/README.md b/ethlog/README.md index f8818d98e..d9b69e106 100644 --- a/ethlog/README.md +++ b/ethlog/README.md @@ -6,6 +6,7 @@ - log level can be set separately per log system - async logging thread: logging IO does not block main thread - log messages are synchronously stringified to avoid incorrectly logging of changed states +- log level enum: ethlog.LogLevel: Silence, ErrorLevel, WarnLevel, InfoLevel, DebugLevel, DebugDetailLevel ## Usage @@ -16,7 +17,10 @@ In an ethereum component package: // package-wide logger using tag var logger = ethlog.NewLogger("TAG") +Logger provides named Printf and Println style methods for all loglevels + logger.Infoln("this is info") # > [TAG] This is info + logger.Infof("this %v is info", object) # > [TAG] This object is info Ethereum wrappers should register log systems conforming to ethlog.LogSystem |