1//
2// LoggingSubsystem.cpp
3//
4// Library: Util
5// Package: Application
6// Module: LoggingSubsystem
7//
8// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
9// and Contributors.
10//
11// SPDX-License-Identifier: BSL-1.0
12//
13
14
15#include "Poco/Util/LoggingSubsystem.h"
16#include "Poco/Util/LoggingConfigurator.h"
17#include "Poco/Util/Application.h"
18#include "Poco/Logger.h"
19
20
21using Poco::Logger;
22
23
24namespace Poco {
25namespace Util {
26
27
28LoggingSubsystem::LoggingSubsystem()
29{
30}
31
32
33LoggingSubsystem::~LoggingSubsystem()
34{
35}
36
37
38const char* LoggingSubsystem::name() const
39{
40 return "Logging Subsystem";
41}
42
43
44void LoggingSubsystem::initialize(Application& app)
45{
46 LoggingConfigurator configurator;
47 configurator.configure(&app.config());
48 std::string logger = app.config().getString("application.logger", "Application");
49 app.setLogger(Logger::get(logger));
50}
51
52
53void LoggingSubsystem::uninitialize()
54{
55}
56
57
58} } // namespace Poco::Util
59