Hey everyone!
Just testing the waters here with a lightweight logging library I put together called Watchtower. I know there are already some logging libraries for Nim out there, but I wanted to try my own approach.
This is actually the lightweight version - I've got a much more feature-rich one in development, but figured I'd start simple and see what the community thinks first.
What this version does:
Quick example:
import watchtower
var logger = newLogger()
logger.setLevel(LogLevel.info)
logger.setOutputMode(OutputMode.console_file)
logger.info("Application started")
logger.warn("Low memory warning")
logger.error("Database connection failed")
GitHub: https://github.com/BeigeHornet151/watchtower
Install:
nimble install https://github.com/BeigeHornet151/watchtower
The full version I'm working on has some pretty epic features, but I wanted to get community feedback on the core design first. Does this approach seem useful? What features would you want to see in a more advanced logging library?
Always curious to hear what other developers are using for logging in their Nim projects.
@Hobbyman This is for application-level logging - tracking what happens in your own code (user actions, errors, API calls, etc).
You can set it to console-only mode if you want to avoid disk writes entirely.
Mainly built it because I got tired of using echo statements for debugging!