X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=tests%2Futil%2Flogger.lua;h=35facd4e45ae0472e3a9eeb0908920b778f5fade;hb=c269396a37a8bef1b71982f2cdd336324eb72d07;hp=ce0a23026c894949995bd7554c76eee368a5207f;hpb=fc65b4a6607ff5e3a469baa4d6d736e433a3e676;p=prosody.git diff --git a/tests/util/logger.lua b/tests/util/logger.lua index ce0a2302..35facd4e 100644 --- a/tests/util/logger.lua +++ b/tests/util/logger.lua @@ -1,3 +1,11 @@ +-- Prosody IM +-- Copyright (C) 2008-2010 Matthew Wild +-- Copyright (C) 2008-2010 Waqas Hussain +-- +-- This project is MIT/X11 licensed. Please see the +-- COPYING file in the source package for more information. +-- + local format = string.format; local print = print; local debug = debug; @@ -25,7 +33,7 @@ function init(name) local inf = debug.getinfo(3, 'Snl'); level = level .. ","..tostring(inf.short_src):match("[^/]*$")..":"..inf.currentline; end - if ... then + if ... then print(name, getstring(logstyles[level], level), format(message, ...)); else print(name, getstring(logstyles[level], level), message);