update doc: list levels and show usage of named print methods

This commit is contained in:
zelig 2014-06-25 16:38:42 +01:00
parent e75f7ae330
commit 6465e4c3fd
1 changed files with 4 additions and 0 deletions

View File

@ -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