MongoDB C++ Driver
legacy-1.1.2
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
mongo
logger
component_message_log_domain.h
1
/* Copyright 2014 MongoDB Inc.
2
*
3
* Licensed under the Apache License, Version 2.0 (the "License");
4
* you may not use this file except in compliance with the License.
5
* You may obtain a copy of the License at
6
*
7
* http://www.apache.org/licenses/LICENSE-2.0
8
*
9
* Unless required by applicable law or agreed to in writing, software
10
* distributed under the License is distributed on an "AS IS" BASIS,
11
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
* See the License for the specific language governing permissions and
13
* limitations under the License.
14
*/
15
16
#pragma once
17
18
#include "mongo/logger/log_component_settings.h"
19
#include "mongo/logger/message_log_domain.h"
20
21
namespace
mongo
{
22
namespace
logger {
23
27
class
MONGO_CLIENT_API
ComponentMessageLogDomain
:
public
MessageLogDomain
{
28
MONGO_DISALLOW_COPYING(
ComponentMessageLogDomain
);
29
30
public
:
31
ComponentMessageLogDomain
();
32
33
~
ComponentMessageLogDomain
();
34
39
bool
shouldLog(
LogComponent
component,
LogSeverity
severity)
const
;
40
bool
shouldLog(
LogComponent
component1,
LogComponent
component2,
LogSeverity
severity)
const
;
41
bool
shouldLog(
LogComponent
component1,
42
LogComponent
component2,
43
LogComponent
component3,
44
LogSeverity
severity)
const
;
45
50
bool
hasMinimumLogSeverity(
LogComponent
component)
const
;
51
55
LogSeverity
getMinimumLogSeverity()
const
;
56
LogSeverity
getMinimumLogSeverity(
LogComponent
component)
const
;
57
61
void
setMinimumLoggedSeverity(
LogSeverity
severity);
62
void
setMinimumLoggedSeverity(
LogComponent
,
LogSeverity
severity);
63
68
void
clearMinimumLoggedSeverity(
LogComponent
component);
69
70
private
:
71
LogComponentSettings
_settings;
72
};
73
74
}
// namespace logger
75
}
// namespace mongo
mongo::logger::LogComponent
Log components.
Definition:
log_component.h:32
mongo
Utility functions for parsing numbers from strings.
Definition:
compare_numbers.h:20
mongo::logger::LogComponentSettings
Contains log severities for a list of log components.
Definition:
log_component_settings.h:30
mongo::logger::ComponentMessageLogDomain
Logging domain for ephemeral messages with minimum severity.
Definition:
component_message_log_domain.h:27
mongo::logger::LogDomain
Logging domain for events of type E.
Definition:
log_domain.h:50
mongo::logger::LogSeverity
Representation of the severity / priority of a log message.
Definition:
log_severity.h:33
Generated by
1.8.10