Skip to content

Commit

Permalink
support changing severity of existing logger
Browse files Browse the repository at this point in the history
CC @SergioTheBest
  • Loading branch information
krlmlr committed Sep 23, 2016
1 parent a8c8bf5 commit a0925ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion inst/include/plog/Init.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ namespace plog
template<int instance>
inline Logger<instance>& init(Severity maxSeverity = none, IAppender* appender = NULL)
{
static Logger<instance> logger(maxSeverity);
static Logger<instance> logger;
logger.setMaxSeverity(maxSeverity);
return appender ? logger.addAppender(appender) : logger;
}

Expand Down
2 changes: 1 addition & 1 deletion inst/include/plog/Logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace plog
class Logger : public util::Singleton<Logger<instance> >, public IAppender
{
public:
Logger(Severity maxSeverity = none) : m_maxSeverity(maxSeverity)
Logger() : m_maxSeverity(none)
{
}

Expand Down

0 comments on commit a0925ed

Please sign in to comment.