use if statement instead of switch (changes of adding new time specifications outside of standard are probably unlikely anyhow)

pattern_time -> pattern_time_type
ptime variable name -> pattern_time variable name
make sure four spaces used, not tabs
This commit is contained in:
ThePhD
2017-05-31 12:52:12 -04:00
parent 18a0455b91
commit d98d54896b
7 changed files with 28 additions and 43 deletions

View File

@@ -66,7 +66,7 @@ public:
void set_level(level::level_enum);
level::level_enum level() const;
const std::string& name() const;
void set_pattern(const std::string&, pattern_time = pattern_time::local);
void set_pattern(const std::string&, pattern_time_type = pattern_time_type::local);
void set_formatter(formatter_ptr);
// automatically call flush() if message level >= log_level
@@ -82,7 +82,7 @@ public:
protected:
virtual void _sink_it(details::log_msg&);
virtual void _set_pattern(const std::string&, pattern_time);
virtual void _set_pattern(const std::string&, pattern_time_type);
virtual void _set_formatter(formatter_ptr);
// default error handler: print the error to stderr with the max rate of 1 message/minute