diff options
| author | Kim van der Riet <kpvdr@apache.org> | 2011-05-02 13:20:36 +0000 |
|---|---|---|
| committer | Kim van der Riet <kpvdr@apache.org> | 2011-05-02 13:20:36 +0000 |
| commit | dbc838fff0b0f157cc13af058f44779e84be65b6 (patch) | |
| tree | 4908c7d8d094128c832144690a30618f58ba0a2e /cpp/include | |
| parent | 9a632f4313cd04646c9b995142d508aeabc21d88 (diff) | |
| download | qpid-python-dbc838fff0b0f157cc13af058f44779e84be65b6.tar.gz | |
QPID-3236 - Add high-resolution timestamps to log files for debug situations. Windows impl has a stub only.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1098554 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/include')
| -rw-r--r-- | cpp/include/qpid/log/Logger.h | 2 | ||||
| -rw-r--r-- | cpp/include/qpid/log/Options.h | 2 | ||||
| -rw-r--r-- | cpp/include/qpid/sys/Time.h | 3 |
3 files changed, 5 insertions, 2 deletions
diff --git a/cpp/include/qpid/log/Logger.h b/cpp/include/qpid/log/Logger.h index 783ab7bdb9..7606436e56 100644 --- a/cpp/include/qpid/log/Logger.h +++ b/cpp/include/qpid/log/Logger.h @@ -36,7 +36,7 @@ namespace log { class Logger : private boost::noncopyable { public: /** Flags indicating what to include in the log output */ - enum FormatFlag { FILE=1, LINE=2, FUNCTION=4, LEVEL=8, TIME=16, THREAD=32}; + enum FormatFlag { FILE=1, LINE=2, FUNCTION=4, LEVEL=8, TIME=16, THREAD=32, HIRES=64}; /** * Logging output sink. diff --git a/cpp/include/qpid/log/Options.h b/cpp/include/qpid/log/Options.h index bbc47b47d3..17cbfde9bc 100644 --- a/cpp/include/qpid/log/Options.h +++ b/cpp/include/qpid/log/Options.h @@ -39,7 +39,7 @@ struct Options : public qpid::Options { std::string argv0; std::string name; std::vector<std::string> selectors; - bool time, level, thread, source, function; + bool time, level, thread, source, function, hiresTs; bool trace; std::string prefix; std::auto_ptr<SinkOptions> sinkOptions; diff --git a/cpp/include/qpid/sys/Time.h b/cpp/include/qpid/sys/Time.h index d3ab832229..154a068d83 100644 --- a/cpp/include/qpid/sys/Time.h +++ b/cpp/include/qpid/sys/Time.h @@ -167,6 +167,9 @@ QPID_COMMON_EXTERN void usleep(uint64_t usecs); /** Output formatted date/time for now*/ void outputFormattedNow(std::ostream&); +/** Output unformatted nanosecond-resolution time for now */ +void outputHiresNow(std::ostream&); + }} #endif /*!_sys_Time_h*/ |
