No description
Find a file
2023-06-02 16:07:43 +08:00
imgs switchable timer; update readme.md 2023-06-02 16:07:43 +08:00
src switchable timer; update readme.md 2023-06-02 16:07:43 +08:00
LICENSE Initial commit 2023-05-30 00:03:20 +08:00
readme.md switchable timer; update readme.md 2023-06-02 16:07:43 +08:00
simplelog.nimble switchable timer; update readme.md 2023-06-02 16:07:43 +08:00

simplelog

A deadly simple log package.

Perform differently in different build modes:

when not defined(release) and not defined(js):

debug

when defined(release): (without filename and number of line)

debug

Choose your own timer:

# demo.nim

import std / times

import simplelog

simplelog.timer =
  proc(): string =
    $now().utc

when isMainModule:
  debug("different timer")
nim c -r demo.nim

output:

2023-06-02T08:02:33Z [DEBUG] E:\projects\simplelog\demo.nim:12 different timer

todo:

  • Log level
  • ...whatever(lazy I am)