Common logging setup for client and service
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Thu, 29 Jan 2015 17:12:01 +0000 (18:12 +0100)
committerMaciej J. Karpiuk <m.karpiuk2@samsung.com>
Tue, 17 Feb 2015 11:12:22 +0000 (12:12 +0100)
commit3837791c10fdba135c4ceeb6d17c7eff0ed8d09b
treeb2394ffa7b4ba085ae9098d6705d83147310d2b6
parent2523f4d47ff685834b5b6e369379b2952bc7e39e
Common logging setup for client and service

[Issue#] N/A
[Feature/Bug] N/A
[Problem] Client may use different logging method than service.
[Cause] Service reads environment flags from config file. Client doesn't
[Solution] Make the client read that file too and setup log system properly.

[Verification] Make changes to /etc/sysconfig/central-key-manager file and see
if both service and client uses the same logging setup (provider and log level)
File format is the following:
"
CKM_LOG_PROVIDER=<provider>
CKM_LOG_LEVEL=<level>
"
where:
<provider> is one of JOURNALD, DLOG, CONSOLE
<level> is <0..5>, 0 means not logs at all, 1 means errors only, 5 means all

Change-Id: I1662fe636f9987778345f8a02afa6fb77f7f1fe0
CMakeLists.txt
packaging/key-manager.spec
src/manager/CMakeLists.txt
src/manager/client/client-common.cpp
src/manager/common/log-setup.cpp [new file with mode: 0644]
src/manager/common/log-setup.h [new file with mode: 0644]
src/manager/dpl/log/include/dpl/log/log.h
src/manager/dpl/log/src/log.cpp
systemd/CMakeLists.txt
systemd/central-key-manager.service.in [moved from systemd/central-key-manager.service with 85% similarity]