src/lib/logging

  Source   Edit

A global logger. Just write stuff to disk safely.

Vars

logger: Logger
The exported logger object.   Source   Edit

Procs

proc close(l: Logger): void {....raises: [IOError],
                              tags: [TimeEffect, WriteIOEffect].}
Release the lock and close/flush the file.   Source   Edit
proc closed(l: Logger): bool {....raises: [], tags: [].}
Returns false if the logfile has been opened.   Source   Edit
proc createLogger(parentdir: string; filename: string): void {.
    ...raises: [ValueError], tags: [TimeEffect, WriteIOEffect].}
Get in line to open a write lock to the configured logfile at filename under parentdir directory. This will block until it can get an exclusive lock.   Source   Edit
proc log(msg: string): void {....raises: [IOError], tags: [WriteIOEffect].}
Emit a line to the logfile.   Source   Edit