'Seņor' Insidiator,<br>
Awesome work on the LibDebuglogger! I'm liking more and more and it's now default on a couple projects I'm working on.<br>
<br>
A small feature request:<br>
Currently, the different severity levels are separate mehtods. This is fine and good, but makes it a occasionally cumbersome if/when you have severity triggering on a variable, or to change the severity level quickly.<br>
<br>
Could you add a small 'single' method, along the lines of:<br>
<br>
<font face="Courier New">LibDebugLogger:Log(msg,sev)</font><br>
(name to be defined, may not be 'Log', whatever's appropriate :) <br>
where (pseudo):<br>
<br>
<font face="Courier New">if sev == "E" or sev==0 then libLog:Error(msg)<br>
elseif sev == "W" or sev==1 then libLog:Warn(msg)<br>
elseif sev == "I" or sev==2 then libLog:Info(msg)<br>
else libLog:Debug(msg) <br>
end<br>
</font><br>
<div><font face="Courier New"><font face="Verdana">'severity' being optional so it allows to default to 'debug' if not present.</font></font></div><br>
That way, we have a standardized call that will always be similar in format, can include severity or not, the severity can be variable-based, and it's fairly simple to change an 'info' to a 'debug', or a 'warning' to an 'error' without having to actually 'rewrite' the call:<br>
<br>
<font face="Courier New">l:Log("I'm a dummy") -- defaults to debug msg<br>
l:Log("Sirinsidiator is awesome",'I') -- info msg<br>
l:Log("I'm about to be a dummy",2) -- warn msg<br>
l:Log("I'm a bumbling dummy",'E') -- error msg<br>
l:Log("I'm a numerical dummy",0) -- another error msg<br></font><div><font face="Courier New">
l:Log("Sirinsidiator is still awesome",2) -- info msg with number</font></div><div><font face="Courier New"><br></font></div><br><div><font face="Courier New"><font face="Verdana">Thanks much!</font><br></font></div><div><font face="Courier New">
</font></div> |