diff --git a/SConstruct b/SConstruct index b992cd6f55da9a6f09f46a785ce9ddeff90fc314..d1b492c04545143a2cf77baf3d6177a867e93938 100644 --- a/SConstruct +++ b/SConstruct @@ -154,7 +154,7 @@ INLINE_OPTS = [ '-finline-limit=5000' ] env.Append( CPPPATH = [ '#/include' ], CXXFLAGS = [ '-Wall', '-Woverloaded-virtual', '-Wno-long-long' ] + INLINE_OPTS, - LIBS = [ 'readline', 'rt', '$BOOSTREGEXLIB', '$BOOSTIOSTREAMSLIB' ], + LIBS = [ 'readline', 'rt', '$BOOSTREGEXLIB', '$BOOSTIOSTREAMSLIB', '$BOOSTSIGNALSLIB' ], TEST_EXTRA_LIBS = [ '$BOOSTFSLIB' ], DOXY_XREF_TYPES = [ 'bug', 'fixme', 'todo', 'idea' ], DOXY_HTML_XSL = '#/doclib/html-munge.xsl', diff --git a/Utils/Logger/IOStreamTarget.cc b/Utils/Logger/IOStreamTarget.cc index d1b30e8da2adbd35da240dd3b7112b9045c65ed6..286f3ba2129470214e50cb8210179c8c24ff83d9 100644 --- a/Utils/Logger/IOStreamTarget.cc +++ b/Utils/Logger/IOStreamTarget.cc @@ -43,7 +43,7 @@ prefix_ senf::log::IOStreamTarget::IOStreamTarget(std::ostream & os) : stream_ (os), tag_ (detail::getDefaultTag()), noformat_ (false), showTime_ (true), - showStream_ (false), showLevel_ (true), showArea_ (true) + showStream_ (false), showLevel_ (true), showArea_ (true), timeBase_ (-1) { std::locale const & loc (datestream_.getloc()); datestream_.imbue( std::locale( @@ -53,9 +53,10 @@ prefix_ senf::log::IOStreamTarget::IOStreamTarget(std::ostream & os) prefix_ void senf::log::IOStreamTarget::timeFormat(std::string const & format) { - if (format.empty()) + if (format.empty()) { noformat_ = true; - else { + timeBase_ = -1; + } else { noformat_ = false; std::locale const & loc (datestream_.getloc()); datestream_.imbue( std::locale( @@ -86,8 +87,14 @@ prefix_ void senf::log::IOStreamTarget::v_write(time_type timestamp, Tokenizer::iterator const i_end (tokenizer.end()); if (showTime_) { - if (noformat_) - datestream_ << std::setfill('0') << std::setw(19) << timestamp; + if (noformat_) { + if (timeBase_ == -1) timeBase_ = timestamp; + time_type delta (timestamp - timeBase_); + datestream_ << std::setfill('0') << std::setw(10) + << (delta / 1000000000ll) << '.' + << std::setfill('0') << std::setw(9) + << (delta % 1000000000ll); + } else datestream_ << senf::ClockService::abstime(timestamp); datestream_ << ' '; diff --git a/Utils/Logger/IOStreamTarget.hh b/Utils/Logger/IOStreamTarget.hh index ba4a3fd6acb4405ca7a602643ea303bb6d66b6e5..8aa5829b2077fd25ef79cd939d8469f61b59a15d 100644 --- a/Utils/Logger/IOStreamTarget.hh +++ b/Utils/Logger/IOStreamTarget.hh @@ -98,6 +98,7 @@ namespace log { bool showLevel_; bool showArea_; + time_type timeBase_; }; }} diff --git a/Utils/Logger/TimeSource.cti b/Utils/Logger/TimeSource.cti index 659b65a4d73c12811beede00ba715d07b88242a0..708de0190d81633a66e8b36780c9c85738a12db4 100644 --- a/Utils/Logger/TimeSource.cti +++ b/Utils/Logger/TimeSource.cti @@ -36,7 +36,7 @@ template <class Source> prefix_ void senf::log::timeSource() { - timeSource(std::auto_ptr<Source>(new Source())); + timeSource(std::auto_ptr<TimeSource>(new Source())); } ///////////////////////////////cti.e/////////////////////////////////////// diff --git a/debian/control b/debian/control index 92aedad500441b2971c5bc4b776fc3b583a4f9b8..aee4b0684ac8c64efdd9cceefa9cca6dc601f9f7 100644 --- a/debian/control +++ b/debian/control @@ -4,8 +4,8 @@ Maintainer: Stefan Bund <senf-dev@lists.berlios.de> Build-Depends: debhelper (>= 5), scons (>= 0.97), g++, binutils-dev, libboost-dev, libboost-test-dev, libboost-date-time-dev, libboost-regex-dev, libboost-filesystem-dev, libboost-serialization-dev, libboost-iostreams-dev, - doxygen (>= 1.5.5), libreadline-dev, dia, tidy, xsltproc, graphviz, perl-base, - linklint, netpbm + libboost-signal-dev, doxygen (>= 1.5.5), libreadline-dev, dia, tidy, xsltproc, + graphviz, perl-base, linklint, netpbm Standards-Version: 3.7.2 Section: libs @@ -36,7 +36,8 @@ Section: libdevel Architecture: all Depends: binutils-dev, libboost-dev, libboost-regex-dev, libboost-date-time-dev, libboost-thread-dev, libboost-serialization-dev, - libboost-filesystem-dev, libsenf (=${source:Version}) | libsenf-dbg (=${source:Version}) + libboost-filesystem-dev, libboost-signal-dev, + libsenf (=${source:Version}) | libsenf-dbg (=${source:Version}) Recommends: libsenf (=${source:Version}), libsenf-dbg (=${source:Version}) Suggests: libsenf-doc (=${source:Version}) Description: SENF Extensible Network Framework, header files diff --git a/senfscons/SENFSCons.py b/senfscons/SENFSCons.py index d8d287cfb67b638823db76bdfb99dcbd39f65b54..b1bf0c4cad48415a9f329578529e5af43fba8237 100644 --- a/senfscons/SENFSCons.py +++ b/senfscons/SENFSCons.py @@ -163,6 +163,7 @@ def FinalizeBoost(env): env['BOOSTREGEXLIB'] = 'boost_regex' + env['BOOST_VARIANT'] env['BOOSTFSLIB'] = 'boost_filesystem' + env['BOOST_VARIANT'] env['BOOSTIOSTREAMSLIB'] = 'boost_iostreams' + env['BOOST_VARIANT'] + env['BOOSTSIGNALSLIB'] = 'boost_signals' + env['BOOST_VARIANT'] if env['BOOST_PREFIX']: env['BOOST_LIBDIR'] = os.path.join(env['BOOST_PREFIX'], 'lib') diff --git a/senfscons/senfutil.py b/senfscons/senfutil.py index 3d2a7424081ef44032d220b03024883ddb108d83..af58a20f6f55cd3611f2991679a6d5a7e7410ad7 100644 --- a/senfscons/senfutil.py +++ b/senfscons/senfutil.py @@ -8,9 +8,11 @@ from SCons.Script import * # c) check for a local SENF, set options accordingly and update that SENF if needed def SetupForSENF(env): - env.Append( LIBS = [ 'senf', 'readline', 'rt', '$BOOSTREGEXLIB', '$BOOSTIOSTREAMSLIB' ], + env.Append( LIBS = [ 'senf', 'readline', 'rt', '$BOOSTREGEXLIB', + '$BOOSTIOSTREAMSLIB', '$BOOSTSIGNALSLIB' ], BOOSTREGEXLIB = 'boost_regex', BOOSTIOSTREAMSLIB = 'boost_iostreams', + BOOSTSIGNALSLIB = 'boost_signals', CXXFLAGS = [ '-Wno-long-long', '${"$CXXFLAGS_"+(final and "final" or "debug")}', '${profile and ("-g","-pg") or None}' ],