CppLogging  1.0.4.0
C++ Logging Library
rolling_file_appender.inl
Go to the documentation of this file.
1 
9 namespace CppLogging {
10 
11 template <class TOutputStream>
12 inline TOutputStream& operator<<(TOutputStream& stream, TimeRollingPolicy policy)
13 {
14  switch (policy)
15  {
17  stream << "Year";
18  break;
20  stream << "Month";
21  break;
23  stream << "Day";
24  break;
26  stream << "Hour";
27  break;
29  stream << "Minute";
30  break;
32  stream << "Second";
33  break;
34  default:
35  stream << "<unknown>";
36  break;
37  }
38  return stream;
39 }
40 
41 } // namespace CppLogging
C++ Logging project definitions.
Definition: appender.h:15
TimeRollingPolicy
Time rolling policy.
@ SECOND
Second rolling policy.
@ MONTH
Monthly rolling policy.
@ MINUTE
Minute rolling policy.
@ DAY
Daily rolling policy.
@ YEAR
Year rolling policy.
@ HOUR
Hour rolling policy.
TOutputStream & operator<<(TOutputStream &stream, TimeRollingPolicy policy)
Stream output: Time rolling policy.