Hello everyone,

How do I make logging output milliseconds? Default formatting options are 
rather conservative in terms of date/time:
    
    
    Format strings support the following variables which must be prefixed with 
the dollar operator (``$``):
    $date         Current date
    $time         Current time
    $datetime     $dateT$time
    
    
    Run

I can't even define my logging subclass cause 
[substituteLog](https://github.com/nim-lang/Nim/blob/master/lib/pure/logging.nim#L103)
 is a proc, not method >:(
    
    
    proc substituteLog*(frmt: string, level: Level, args: varargs[string, 
`$`]): string =
      # ...
      case v
          of "date": result.add(getDateStr())
          of "time": result.add(getClockStr())
          of "datetime": result.add(getDateStr() & "T" & getClockStr())
    
    
    Run

I guess I have to redefine log method but it's a bit ugly solution. Any chance 
to make logging more configurable?

Reply via email to