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',
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(
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(
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_ << ' ';
bool showLevel_;
bool showArea_;
+ time_type timeBase_;
};
}}
template <class Source>
prefix_ void senf::log::timeSource()
{
- timeSource(std::auto_ptr<Source>(new Source()));
+ timeSource(std::auto_ptr<TimeSource>(new Source()));
}
///////////////////////////////cti.e///////////////////////////////////////
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
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
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')
# 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}' ],