diff options
author | Rafal Krypa <r.krypa@samsung.com> | 2014-09-08 16:04:18 +0200 |
---|---|---|
committer | Rafal Krypa <r.krypa@samsung.com> | 2014-09-15 13:51:53 +0200 |
commit | 756ca93d1b5cb1024919aae81723a7a03434c9a3 (patch) | |
tree | a19a653a301c5e353e04d71f1bf1666031fd12b8 | |
parent | 4f7783b0344536c1cfb2332478bc0b3b14fc1db9 (diff) | |
download | security-manager-756ca93d1b5cb1024919aae81723a7a03434c9a3.tar.gz security-manager-756ca93d1b5cb1024919aae81723a7a03434c9a3.tar.bz2 security-manager-756ca93d1b5cb1024919aae81723a7a03434c9a3.zip |
Completely remove dlog remainings
Security-manager uses systemd for logging for some time already, this
code is no longer needed.
Change-Id: I9f099c00422ffeed23f65d8350bf7d8957cc00af
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
-rw-r--r-- | packaging/security-manager.spec | 1 | ||||
-rw-r--r-- | src/common/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/dpl/log/include/dpl/log/dlog_log_provider.h | 74 | ||||
-rw-r--r-- | src/dpl/log/src/dlog_log_provider.cpp | 109 |
4 files changed, 0 insertions, 186 deletions
diff --git a/packaging/security-manager.spec b/packaging/security-manager.spec index 4f36bc55..a589b8a9 100644 --- a/packaging/security-manager.spec +++ b/packaging/security-manager.spec @@ -10,7 +10,6 @@ Source3: libsecurity-manager-client.manifest Requires(post): smack BuildRequires: cmake BuildRequires: zip -# BuildRequires: pkgconfig(dlog) BuildRequires: libattr-devel BuildRequires: libcap-devel BuildRequires: pkgconfig(libsmack) diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index f599bb1b..f2dbde42 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -4,7 +4,6 @@ SET(COMMON_VERSION ${COMMON_VERSION_MAJOR}.1.0) PKG_CHECK_MODULES(COMMON_DEP REQUIRED libsystemd-journal -# dlog ) INCLUDE_DIRECTORIES(SYSTEM @@ -22,7 +21,6 @@ SET(COMMON_SOURCES ${COMMON_PATH}/message-buffer.cpp ${COMMON_PATH}/smack-common.cpp ${DPL_PATH}/log/src/abstract_log_provider.cpp -# ${DPL_PATH}/log/src/dlog_log_provider.cpp ${DPL_PATH}/log/src/sd_journal_provider.cpp ${DPL_PATH}/log/src/log.cpp ${DPL_PATH}/log/src/old_style_log_provider.cpp diff --git a/src/dpl/log/include/dpl/log/dlog_log_provider.h b/src/dpl/log/include/dpl/log/dlog_log_provider.h deleted file mode 100644 index b5e39fcd..00000000 --- a/src/dpl/log/include/dpl/log/dlog_log_provider.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/* - * @file dlog_log_provider.h - * @author Przemyslaw Dobrowolski (p.dobrowolsk@samsung.com) - * @version 1.0 - * @brief This file is the implementation file of DLOG log provider - */ -#ifndef SECURITYMANAGER_DLOG_LOG_PROVIDER_H -#define SECURITYMANAGER_DLOG_LOG_PROVIDER_H - -#include <dpl/log/abstract_log_provider.h> -#include <memory> -#include <string> - -namespace SecurityManager { -namespace Log { -class DLOGLogProvider : - public AbstractLogProvider -{ - private: - std::unique_ptr<char[]> m_tag; - - static std::string FormatMessage(const char *message, - const char *filename, - int line, - const char *function); - - public: - DLOGLogProvider(); - virtual ~DLOGLogProvider(); - - virtual void Debug(const char *message, - const char *fileName, - int line, - const char *function); - virtual void Info(const char *message, - const char *fileName, - int line, - const char *function); - virtual void Warning(const char *message, - const char *fileName, - int line, - const char *function); - virtual void Error(const char *message, - const char *fileName, - int line, - const char *function); - virtual void Pedantic(const char *message, - const char *fileName, - int line, - const char *function); - - // Set global Tag according to DLOG - void SetTag(const char *tag); -}; - -} // namespace Log -} // namespace SecurityManager - -#endif // SECURITYMANAGER_DLOG_LOG_PROVIDER_H diff --git a/src/dpl/log/src/dlog_log_provider.cpp b/src/dpl/log/src/dlog_log_provider.cpp deleted file mode 100644 index 79a7fd47..00000000 --- a/src/dpl/log/src/dlog_log_provider.cpp +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/* - * @file dlog_log_provider.cpp - * @author Przemyslaw Dobrowolski (p.dobrowolsk@samsung.com) - * @version 1.0 - * @brief This file is the implementation file of DLOG log provider - */ -#include <stddef.h> -#include <dpl/log/dlog_log_provider.h> -#include <cstring> -#include <sstream> -#include <dlog.h> - -#define UNUSED __attribute__((unused)) - -namespace SecurityManager { -namespace Log { -std::string DLOGLogProvider::FormatMessage(const char *message, - const char *filename, - int line, - const char *function) -{ - std::ostringstream val; - - val << std::string("[") << - LocateSourceFileName(filename) << std::string(":") << line << - std::string("] ") << function << std::string("(): ") << message; - - return val.str(); -} - -DLOGLogProvider::DLOGLogProvider() -{} - -DLOGLogProvider::~DLOGLogProvider() -{} - -void DLOGLogProvider::SetTag(const char *tag) -{ - size_t size = strlen(tag)+1; - char *buff = new (std::nothrow) char[size]; - if (buff) - memcpy(buff, tag, size); - m_tag.reset(buff); -} - -void DLOGLogProvider::Debug(const char *message, - const char *filename, - int line, - const char *function) -{ - SLOG(LOG_DEBUG, m_tag.get(), "%s", - FormatMessage(message, filename, line, function).c_str()); -} - -void DLOGLogProvider::Info(const char *message, - const char *filename, - int line, - const char *function) -{ - SLOG(LOG_INFO, m_tag.get(), "%s", - FormatMessage(message, filename, line, function).c_str()); -} - -void DLOGLogProvider::Warning(const char *message, - const char *filename, - int line, - const char *function) -{ - SLOG(LOG_WARN, m_tag.get(), "%s", - FormatMessage(message, filename, line, function).c_str()); -} - -void DLOGLogProvider::Error(const char *message, - const char *filename, - int line, - const char *function) -{ - SLOG(LOG_ERROR, m_tag.get(), "%s", - FormatMessage(message, filename, line, function).c_str()); -} - -void DLOGLogProvider::Pedantic(const char *message, - const char *filename, - int line, - const char *function) -{ - SLOG(LOG_DEBUG, "SecurityManager", "%s", FormatMessage(message, - filename, - line, - function).c_str()); -} - -} // nemespace Log -} // namespace SecurityManager |