mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-02-23 13:17:14 +01:00
Switched to POCO library for unified platform/library interface. Deprecated the external module API. It was creating more problems than solving. Removed most built-in libraries in favor of system libraries for easier maintenance. Cleaned and secured code with help from static analyzers.
59 lines
939 B
C++
59 lines
939 B
C++
//
|
|
// LoggingSubsystem.cpp
|
|
//
|
|
// Library: Util
|
|
// Package: Application
|
|
// Module: LoggingSubsystem
|
|
//
|
|
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
|
|
// and Contributors.
|
|
//
|
|
// SPDX-License-Identifier: BSL-1.0
|
|
//
|
|
|
|
|
|
#include "Poco/Util/LoggingSubsystem.h"
|
|
#include "Poco/Util/LoggingConfigurator.h"
|
|
#include "Poco/Util/Application.h"
|
|
#include "Poco/Logger.h"
|
|
|
|
|
|
using Poco::Logger;
|
|
|
|
|
|
namespace Poco {
|
|
namespace Util {
|
|
|
|
|
|
LoggingSubsystem::LoggingSubsystem()
|
|
{
|
|
}
|
|
|
|
|
|
LoggingSubsystem::~LoggingSubsystem()
|
|
{
|
|
}
|
|
|
|
|
|
const char* LoggingSubsystem::name() const
|
|
{
|
|
return "Logging Subsystem";
|
|
}
|
|
|
|
|
|
void LoggingSubsystem::initialize(Application& app)
|
|
{
|
|
LoggingConfigurator configurator;
|
|
configurator.configure(app.configPtr());
|
|
std::string logger = app.config().getString("application.logger", "Application");
|
|
app.setLogger(Logger::get(logger));
|
|
}
|
|
|
|
|
|
void LoggingSubsystem::uninitialize()
|
|
{
|
|
}
|
|
|
|
|
|
} } // namespace Poco::Util
|