diff options
author | Jose <jose@zeroc.com> | 2016-04-07 19:07:10 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2016-04-07 19:07:10 +0200 |
commit | 538771b59abc2dedbf163abdc4df282224ae4d18 (patch) | |
tree | 51350d8db53fccfae5c3c9f5d6ff5ffe3b0d99ba /cpp/src/IceUtil/Time.cpp | |
parent | ICE-7035 - Add option to roll log files (diff) | |
download | ice-538771b59abc2dedbf163abdc4df282224ae4d18.tar.bz2 ice-538771b59abc2dedbf163abdc4df282224ae4d18.tar.xz ice-538771b59abc2dedbf163abdc4df282224ae4d18.zip |
Do not throw if log rotation fails.
If log rotate fails because the file cannot be renamed
we will keep using the same log file or in case that it
cannot be reopen we will log to stderr.
Diffstat (limited to 'cpp/src/IceUtil/Time.cpp')
-rw-r--r-- | cpp/src/IceUtil/Time.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cpp/src/IceUtil/Time.cpp b/cpp/src/IceUtil/Time.cpp index aa6f6e944d9..a771815ddb6 100644 --- a/cpp/src/IceUtil/Time.cpp +++ b/cpp/src/IceUtil/Time.cpp @@ -248,7 +248,7 @@ std::string IceUtil::Time::toDateTime() const { std::ostringstream os; - os << toFormatString("%x %H:%M:%S") << "."; + os << toString("%x %H:%M:%S") << "."; os.fill('0'); os.width(3); os << static_cast<long>(_usec % 1000000 / 1000); @@ -281,7 +281,7 @@ IceUtil::Time::toDuration() const } std::string -IceUtil::Time::toFormatString(const std::string& format) const +IceUtil::Time::toString(const std::string& format) const { time_t time = static_cast<long>(_usec / 1000000); |