hoelzro / obvious

Widget library for the awesome window manager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Developer Tools

sergeyklay opened this issue · comments

Hi!

I propose to include some logging library eg. LuaLogging. Thus we can set the flag and log file globally, for example

DEBUG = true -- false
logger = logging.file("/var/log/obvious-%s.log", "%Y-%m-%d")

-- And use this in future as needed

local pipe = popen('sensors -u', 'r')
if not pipe then
   if DEBUG then logger:debug("Can't open pipe")
   return
end

I think this is a good idea, but I'm reluctant to depend too heavily on external libraries like LuaLogging. As long as it is included as an optional dependency, I'm ok with it!