clux / logule

A multi-transport, peer-dependent logging library for nodejs - UNMAINTAINED
MIT License
35 stars 5 forks source link

customize the date string #1

Closed lookfirst closed 12 years ago

lookfirst commented 12 years ago

I'd like milliseconds in the date string. Why not let me just customize it?

clux commented 12 years ago

Yeah, there are a lot of ways in which customization in logule would be nice to have. I didn't need it at the time I was originally writing it, and just decided to release what I had done rather than cater for all these possibilities.

That said, I do want to add some extra customizability in one form or another. There is already one fork out there having added customization along similar lines. However, while the idea of logule is that dependency injection of the previous owner's instance is a good thing, I don't want to have to do that everywhere (especially at module borders is this difficult). Thus, customization should be more of a global thing rather than per instance basis (since the output ideally should look the same independent on who instantiated logule, and where etc).

I need to think a little about what best way to achieve this, maybe a config file, maybe a global, overridable set config call, don't know yet. When that's done, ideally, you may fork away and add any customization features you'd like.

lookfirst commented 12 years ago

Wow, this is exactly why I switched to nlogger. I liked your logger cause it gave me some pretty colors, but the lack of a way to simply format the date string into something useful (seconds is not good enough precision for ANY logging) made me switch to something else. Seriously, logging doesn't need to be reinvented 1000 times, I regret opening this issue.

clux commented 12 years ago

You 'regret opening the issue'? I didn't say no..

clux commented 12 years ago

Customization is in! For logule >= 0.7.0

clux commented 12 years ago

See default config file