src/stones/log

Search:
Group by:
Source   Edit  

Types

AlertLevel = enum
  FATAL = 0, ERROR = 1, SUCCESS = 2, DEPRECATED = 3, WARNING = 4, INFO = 5,
  DEBUG = 6
Level of noise to be logged. Source   Edit  
GenericError = object of Exception
Default exception to throw if there is no error passed in with a FATAL call. Source   Edit  

Procs

proc LOG(level: AlertLevel; message: string; exception: typedesc = GenericError): void
Log message (and throw error if level is FATAL). Source   Edit  
proc setLevel(level: AlertLevel): void {....raises: [GenericError], tags: [],
    forbids: [].}
Set global AlertLevel (if LOG() level is lower than the level set here, it will be ignored.) Source   Edit