1 /******************************************************************
3 * Copyright 2017 - 2020 Samsung Electronics All Rights Reserved.
5 * Author: Jaroslaw Pelczar <j.pelczar@samsung.com>
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
19 ******************************************************************/
21 #ifndef DCM_DAEMON_LOGGING_H_
22 #define DCM_DAEMON_LOGGING_H_
24 #include <boost/log/common.hpp>
25 #include <boost/log/expressions.hpp>
26 #include <boost/log/attributes.hpp>
27 #include <boost/log/sinks/sync_frontend.hpp>
28 #include <boost/log/sinks/syslog_backend.hpp>
29 #include <boost/log/sources/logger.hpp>
30 #include <boost/log/utility/setup/console.hpp>
31 #include <boost/log/utility/setup/common_attributes.hpp>
32 #include <boost/log/attributes/timer.hpp>
33 #include <boost/log/attributes/named_scope.hpp>
35 #define LOG_TAG "DCM_SERVER"
38 enum class log_severity {
45 // Global logger declaration
46 BOOST_LOG_INLINE_GLOBAL_LOGGER_DEFAULT(dcm_logger, boost::log::sources::severity_logger_mt<log_severity>)
48 #if defined(NDEBUG) && !defined(DEBUG)
50 #define ENABLE_DEBUG_LOGGING 1
53 #endif /* DCM_DAEMON_LOGGING_H_ */