diff options
author | Marcin Lis <m.lis@samsung.com> | 2014-07-08 16:17:45 +0200 |
---|---|---|
committer | Marcin Lis <m.lis@samsung.com> | 2014-07-09 17:54:25 +0200 |
commit | f279ce7a3a112f4d01ea99e1772ec01692779272 (patch) | |
tree | d434e4d47c483b79922221e3d0fb7a034e2c8804 | |
parent | df29c8c8c059fa785cdda80b0657063fd06aaca0 (diff) | |
download | security-manager-f279ce7a3a112f4d01ea99e1772ec01692779272.tar.gz security-manager-f279ce7a3a112f4d01ea99e1772ec01692779272.tar.bz2 security-manager-f279ce7a3a112f4d01ea99e1772ec01692779272.zip |
Logging: Change the default log provider to systemd journal.
This change replaces the default logging mechanism in the whole security
manager. The dlog provider is not used anymore and it is also excluded from
being build along with the project. Its sources should stay untouched by now.
To verify, first please install this together with the latest security-tests
package. When installed, run tests:
# security-manager-tests --output=text
And after that please check for the presence of traces in journal:
# journalctl --unit=security-manager.service
Please also check for the presence of security-manager-client traces:
# journalctl /usr/bin/security-manager-tests
Change-Id: I4af35d29a6a61d3a5a0bc4c3508bb872206a2f23
Signed-off-by: Marcin Lis <m.lis@samsung.com>
-rw-r--r-- | packaging/security-manager.spec | 2 | ||||
-rw-r--r-- | src/common/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/dpl/log/include/dpl/log/log.h | 3 | ||||
-rw-r--r-- | src/dpl/log/src/log.cpp | 10 | ||||
-rw-r--r-- | src/dpl/log/src/old_style_log_provider.cpp | 1 |
5 files changed, 8 insertions, 12 deletions
diff --git a/packaging/security-manager.spec b/packaging/security-manager.spec index 9ba78900..e9ebbd27 100644 --- a/packaging/security-manager.spec +++ b/packaging/security-manager.spec @@ -10,7 +10,7 @@ Source3: libsecurity-manager-client.manifest Requires(post): smack BuildRequires: cmake BuildRequires: zip -BuildRequires: pkgconfig(dlog) +# 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 f3ce1a45..e62c2220 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -4,7 +4,7 @@ SET(COMMON_VERSION ${COMMON_VERSION_MAJOR}.1.0) PKG_CHECK_MODULES(COMMON_DEP REQUIRED libsystemd-journal - dlog +# dlog ) INCLUDE_DIRECTORIES(SYSTEM @@ -21,7 +21,7 @@ SET(COMMON_SOURCES ${COMMON_PATH}/protocols.cpp ${COMMON_PATH}/message-buffer.cpp ${DPL_PATH}/log/src/abstract_log_provider.cpp - ${DPL_PATH}/log/src/dlog_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/log.h b/src/dpl/log/include/dpl/log/log.h index df8e1ff8..206223c7 100644 --- a/src/dpl/log/include/dpl/log/log.h +++ b/src/dpl/log/include/dpl/log/log.h @@ -90,9 +90,6 @@ class LogSystem : int line, const char *function); - /** - * Set default's DLOG provider Tag - */ void SetTag(const char *tag); /** diff --git a/src/dpl/log/src/log.cpp b/src/dpl/log/src/log.cpp index fd43a2f9..fb94ec5d 100644 --- a/src/dpl/log/src/log.cpp +++ b/src/dpl/log/src/log.cpp @@ -24,7 +24,7 @@ #include <dpl/log/log.h> #include <dpl/singleton_impl.h> -#include <dpl/log/dlog_log_provider.h> +#include <dpl/log/sd_journal_provider.h> #include <dpl/log/old_style_log_provider.h> IMPLEMENT_SINGLETON(SecurityManager::Log::LogSystem) @@ -109,7 +109,7 @@ LogSystem::LogSystem() : } } - // Setup default DLOG and old style logging + // Setup default systemd journal and old style logging if (oldStyleLogs) { // Old style AddProvider(new OldStyleLogProvider(oldStyleDebugLogs, @@ -118,11 +118,11 @@ LogSystem::LogSystem() : oldStyleErrorLogs, oldStylePedanticLogs)); } else { - // DLOG - AddProvider(new DLOGLogProvider()); + // Systemd Journal + AddProvider(new SdJournalProvider()); } #else // BUILD_TYPE_DEBUG - AddProvider(new DLOGLogProvider()); + AddProvider(new SdJournalProvider()); #endif // BUILD_TYPE_DEBUG } diff --git a/src/dpl/log/src/old_style_log_provider.cpp b/src/dpl/log/src/old_style_log_provider.cpp index d302131b..a88a2b16 100644 --- a/src/dpl/log/src/old_style_log_provider.cpp +++ b/src/dpl/log/src/old_style_log_provider.cpp @@ -27,7 +27,6 @@ #include <sstream> #include <sys/time.h> #include <unistd.h> -#include <dlog.h> namespace SecurityManager { namespace Log { |