map any attempt to log to an unknown logsink to the core logsink, fixes 577

git-svn-id: file:///home/svn/framework3/trunk@7653 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
James Lee 2009-11-30 22:03:53 +00:00
parent ed7b7ac6f0
commit 125f0aab0a
1 changed files with 4 additions and 1 deletions

View File

@ -87,6 +87,9 @@ class LogDispatcher
# Performs the actual log operation against the supplied source
#
def log(sev, src, level, msg, from)
if (log_sinks[src].nil? and log_sinks['core'])
register_log_source(src, log_sinks['core'], get_log_level('core'))
end
log_sinks_lock.synchronize {
if ((sink = log_sinks[src]))
next if (log_levels[src] and level > log_levels[src])
@ -176,4 +179,4 @@ def get_log_level(src)
end
# Creates the global log dispatcher
$dispatcher = Rex::Logging::LogDispatcher.new
$dispatcher = Rex::Logging::LogDispatcher.new