Adding more documentation to logging.nim

Just minor addition to the documentation with the use of operators
This commit is contained in:
Istvan 2018-12-17 19:29:08 +01:00 • committed by GitHub
commit 915a9ec082
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,7 +12,7 @@
## write your own.
##
## Format strings support the following variables which must be prefixed with
## the dollar operator (``$``):
## the dollar operator (``$``, see example below):
##
## ============ =======================
## Operator Output
@ -43,6 +43,11 @@
## warn("4 8 15 16 23 4-- Error")
## error("922044:16 SYSTEM FAILURE")
## fatal("SYSTEM FAILURE SYSTEM FAILURE")
## # Using the aformetioned operator
## var opL = newConsoleLogger(fmtStr = "$datetime :: ")
## addHandler(opL)
## info("Starting web server...")
## # Will print something like 2018-12-17T19:28:05 :: Starting web server...
##
## **Warning:** The global list of handlers is a thread var, this means that
## the handlers must be re-added in each thread.