lib/openwfe/logging.rb in openwferu-0.9.15 vs lib/openwfe/logging.rb in openwferu-0.9.16

- old
+ new

@@ -28,22 +28,19 @@ # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. #++ # -# $Id: definitions.rb 2725 2006-06-02 13:26:32Z jmettraux $ -# # # "made in Japan" # # John Mettraux at openwfe.org # require 'logger' require 'openwfe/utils' -#require 'openwfe/rudefinitions' module OpenWFE # @@ -73,10 +70,14 @@ def lunknown (message=nil, &block) do_log(:unknown, message, &block) end + def llog (level, message=nil, &block) + do_log(level, message, &block) + end + # # A simplification of caller_to_s for direct usage when debugging # def ldebug_callstack (msg, max_lines=nil) ldebug { "#{msg}\n" + OpenWFE::caller_to_s(9, max_lines) } @@ -98,10 +99,10 @@ $OWFE_LOG.send level, &logblock end def log_prepare (message) - return log_author() if not message + return log_author() unless message return "#{log_author} - #{message}" end def log_author if respond_to? :service_name