Inject logger instead of using a singleton
This commit is contained in:
@@ -90,11 +90,12 @@ namespace Middleware
|
||||
return;
|
||||
}
|
||||
|
||||
StaticContent::StaticContent(std::string const & staticFileRoot)
|
||||
: root(staticFileRoot)
|
||||
StaticContent::StaticContent(Logger & _logger, std::string const & staticFileRoot)
|
||||
: BaseMiddleware(_logger),
|
||||
root(staticFileRoot)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << "Using static file root " << root;
|
||||
Logger::GetInstance().Info(ss.str());
|
||||
_logger.Info(ss.str());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user