From: g0dil Date: Thu, 15 Nov 2007 08:41:16 +0000 (+0000) Subject: Add SENF internal senf::SenfLog debug stream and make it default for the 'senf' names... X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=949e357e249299c8519aa3af62245a0010dcce44;hp=6a3a31fb7b2d2a5e8ae6d67d50797700274fb34e;p=senf.git Add SENF internal senf::SenfLog debug stream and make it default for the 'senf' namespace. Small SCons V0.96 compatibility fix git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@519 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/PPI/DebugModules.hh b/PPI/DebugModules.hh index b52b871..990df6b 100644 --- a/PPI/DebugModules.hh +++ b/PPI/DebugModules.hh @@ -32,7 +32,7 @@ #include "../Packets/Packets.hh" #include "Module.hh" #include "ActiveFeeder.hh" -#include "../Utils/Logger.hh" +#include "../Utils/Logger/SenfLog.hh" //#include "DebugModules.mpp" ///////////////////////////////hh.p//////////////////////////////////////// diff --git a/Scheduler/Scheduler.hh b/Scheduler/Scheduler.hh index f0712b8..42432ed 100644 --- a/Scheduler/Scheduler.hh +++ b/Scheduler/Scheduler.hh @@ -37,7 +37,7 @@ #include #include #include "ClockService.hh" -#include "../Utils/Logger.hh" +#include "../Utils/Logger/SenfLog.hh" //#include "scheduler.mpp" ///////////////////////////////hh.p//////////////////////////////////////// diff --git a/Utils/Logger/SConscript b/Utils/Logger/SConscript index ab682dd..6b3c30f 100644 --- a/Utils/Logger/SConscript +++ b/Utils/Logger/SConscript @@ -8,11 +8,13 @@ import SENFSCons, glob SENFSCons.StandardTargets(env) SENFSCons.AllIncludesHH(env, [ f for f in glob.glob("*.hh") - if ( f not in ('all_includes.hh','Logger.hh') + if ( f not in ('all_includes.hh','Logger.hh','SenfLog.hh') and not f.endswith('.test.hh') ) ]) sources = SENFSCons.GlobSources() objects = SENFSCons.Objects( env, sources = sources, LIBS = [ 'Utils' ] ) +SENFSCons.InstallIncludeFiles(env, [ 'SenfLog.hh' ]) + SENFSCons.Doxygen(env) Return('objects') diff --git a/Utils/Logger/SenfLog.hh b/Utils/Logger/SenfLog.hh new file mode 100644 index 0000000..23098e4 --- /dev/null +++ b/Utils/Logger/SenfLog.hh @@ -0,0 +1,58 @@ +// $Id$ +// +// Copyright (C) 2007 +// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) +// Kompetenzzentrum fuer NETwork research (NET) +// Stefan Bund +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the +// Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +/** \file + \brief SenfLog public header */ + +#ifndef HH_SenfLog_ +#define HH_SenfLog_ 1 + +// Custom includes +#include "../../config.hh" +#include "Logger.hh" + +//#include "SenfLog.mpp" +///////////////////////////////hh.p//////////////////////////////////////// + +namespace senf { + + SENF_LOG_DEF_STREAM(SenfLog, senf::log::MESSAGE, senf::log::MESSAGE, SENF_SENFLOG_LIMIT); + SENF_LOG_DEFAULT_STREAM(SenfLog); + +} + +///////////////////////////////hh.e//////////////////////////////////////// +//#include "SenfLog.cci" +//#include "SenfLog.ct" +//#include "SenfLog.cti" +#endif + + +// Local Variables: +// mode: c++ +// fill-column: 100 +// comment-column: 40 +// c-file-style: "senf" +// indent-tabs-mode: nil +// ispell-local-dictionary: "american" +// compile-command: "scons -u test" +// End: diff --git a/config.hh b/config.hh index 4ecb902..3a8b2c9 100644 --- a/config.hh +++ b/config.hh @@ -70,6 +70,10 @@ # # endif +# ifndef SENF_SENFLOG_LIMIT +# define SENF_SENFLOG_LIMIT senf::log::VERBOSE +# endif + ///////////////////////////////hh.e//////////////////////////////////////// //#include "config.cci" //#include "config.ct" diff --git a/senfscons/SENFSCons.py b/senfscons/SENFSCons.py index d5742bf..61f07ea 100644 --- a/senfscons/SENFSCons.py +++ b/senfscons/SENFSCons.py @@ -366,7 +366,8 @@ def InstallSourceIncludes(env, sources): target = env.Dir(env['INCLUDEINSTALLDIR']).Dir( env.Dir('.').get_path(env.Dir(env['INSTALL_BASE']))) install = env.InstallIncludes( target = target, - source = sources, + source = [ type(x) is str and env.File(x) or x + for x in sources ], INSTALL_BASE = env.Dir('.') ) env.Alias( 'install_all', install )