X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FLogger%2FTarget.cc;h=91d231e98ed78fb25c0b9357e541cc8e57b0ac1e;hb=d0776a27ffd63ab51b4e3419a8a6f87d11e60594;hp=2d4ded96cf2d4c25f3fea1cfe067bd24089d71dc;hpb=c7512677a51c8ba551ab23611d6e99bdc7a7fdfa;p=senf.git diff --git a/Utils/Logger/Target.cc b/Utils/Logger/Target.cc index 2d4ded9..91d231e 100644 --- a/Utils/Logger/Target.cc +++ b/Utils/Logger/Target.cc @@ -1,8 +1,8 @@ // $Id$ // -// Copyright (C) 2007 -// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) -// Kompetenzzentrum fuer Satelitenkommunikation (SatCom) +// Copyright (C) 2007 +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY // Stefan Bund // // This program is free software; you can redistribute it and/or modify @@ -45,8 +45,8 @@ prefix_ senf::log::Target::Target() prefix_ senf::log::Target::~Target() { while( ! rib_.empty()) { - // This is terribly slow but simplifies the area cache handling and removing a target should - // be quite seldom + // This is slow but simplifies the area cache handling and removing a target should be + // relatively seldom RIB::reverse_iterator i (rib_.rbegin()); unroute(i->stream_, i->area_, i->level_, i->action_); } @@ -208,9 +208,11 @@ prefix_ void senf::log::detail::TargetRegistry::write(StreamBase const & stream, AreaBase const & area, unsigned level, std::string msg) { - if (fallbackRouting_) - static_cast(ConsoleTarget::instance()).v_write( - (*timeSource_)(), stream.v_name(), area.v_name(), level, msg ); + if (fallbackRouting_) { + if (level >= stream.defaultRuntimeLimit()) + static_cast(ConsoleTarget::instance()).v_write( + (*timeSource_)(), stream.v_name(), area.v_name(), level, msg ); + } else area.write( (*timeSource_)(), stream, level, msg ); }