From 6465e4c3fd21e7002e5870069c51755bd2c66df5 Mon Sep 17 00:00:00 2001 From: zelig Date: Wed, 25 Jun 2014 16:38:42 +0100 Subject: update doc: list levels and show usage of named print methods --- ethlog/README.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ethlog') 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 -- cgit v1.2.3