common: log: complete rewrite, now with more features and understandable code!