summaryrefslogtreecommitdiff
path: root/qpid/cpp/include
diff options
context:
space:
mode:
authorKim van der Riet <kpvdr@apache.org>2011-05-02 13:20:36 +0000
committerKim van der Riet <kpvdr@apache.org>2011-05-02 13:20:36 +0000
commitec321fedb7067715b76a196a32c29367bc0e5e30 (patch)
treef11260706c6a58e3cbb4c4fc4fe9e370bfbf7e85 /qpid/cpp/include
parentf40511922697d65a91b83896341d351c5dbf909b (diff)
downloadqpid-python-ec321fedb7067715b76a196a32c29367bc0e5e30.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@1098554 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/include')
-rw-r--r--qpid/cpp/include/qpid/log/Logger.h2
-rw-r--r--qpid/cpp/include/qpid/log/Options.h2
-rw-r--r--qpid/cpp/include/qpid/sys/Time.h3
3 files changed, 5 insertions, 2 deletions
diff --git a/qpid/cpp/include/qpid/log/Logger.h b/qpid/cpp/include/qpid/log/Logger.h
index 783ab7bdb9..7606436e56 100644
--- a/qpid/cpp/include/qpid/log/Logger.h
+++ b/qpid/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/qpid/cpp/include/qpid/log/Options.h b/qpid/cpp/include/qpid/log/Options.h
index bbc47b47d3..17cbfde9bc 100644
--- a/qpid/cpp/include/qpid/log/Options.h
+++ b/qpid/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/qpid/cpp/include/qpid/sys/Time.h b/qpid/cpp/include/qpid/sys/Time.h
index d3ab832229..154a068d83 100644
--- a/qpid/cpp/include/qpid/sys/Time.h
+++ b/qpid/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*/