Improved logging functions: log(), log.warn(), log.error()