You are not logged in.

#1 2012-03-08 02:35:53

iv597
Member
From: United States
Registered: 2011-09-18
Posts: 96
Website

primitivelogger - A barebones-simple file and/or stdout/stderr logger

Nothing too major to announce here, just thought I'd share in case anyone wanted to make use of this. Basically, I've been writing my media player app, and obviously found a need for logs. But for one, I wanted logs that could be colorized if they were headed to STDOUT/STDERR, and otherwise be "boring". And I just wanted something to code.

So, I present to you "primitivelogger", a reinventing-the-wheel-because-I-can barebones logger that uses Clint for color when sending things to the standard outs, which is the default. You can specify a log file and a date/time format when setting up the logger object, and use its 3 simple functions: info(), error(), and fatal(). Take a look on Github if you want. If you have an idea, fire away, I'm open to decent suggestions. And if you don't like it, well... that's cool too! big_smile

It's Python 2/3 compatable and is on the AUR as python[2]-primitivelogger-git. I dunno if I'll be making a non-git package or not. Might be useful for some cases but as I doubt this gets updated much, it'd probably be pretty redundant.


Currently running Arch on a Samsung Chromebook Pro (dual booted with ChromeOS), and various VPSes and Docker containers.

Dotfiles on Github

Offline

Board footer

Powered by FluxBB