I think it boils down to me being used to use "binary" libraries in Java. When 
something goes wrong in that case, you can't really tell what happens without 
logging (unless you can reproduce it in a debugger). OTOH, Nim's "libraries" 
are (AFAIK) mostly available in source form, so one can easily add "echo()" 
where appropriate as needed, and so I see there is a lesser need for built-in 
logging with Nim.

The other reason I was considering adding logging to my "libraries", is that 
bugs in multi-threaded apps are generally hard to track down, and given the 
limited amount of time I have to work on them, they are likely to be bugged, so 
it would be useful to just crank the logging to "debug" when needed.

I think a litte utility type that works like a Java ThreadLocal that takes a 
proc pointer/lambda as parameter, and does lazy-init for you would be a nice 
addition to the standard library. I'll try to prototype that one day.

Reply via email to