Clean-up logging
authorBartlomiej Grzelewski <b.grzelewski@samsung.com>
Wed, 11 Sep 2013 09:26:51 +0000 (11:26 +0200)
committerBartlomiej Grzelewski <b.grzelewski@samsung.com>
Thu, 6 Feb 2014 16:13:22 +0000 (17:13 +0100)
Change logging in ss1, now in RELEASE build log only errors

    [Issue#]        SSDWSSP-457
    [Bug/Feature]   Clean-up logging
    [Cause]         N/A
    [Solution]      N/A
    [Verification]  Build

Change-Id: I1584eafdcaec478cc6ccab40bcb55a8969e21b1a

src/CMakeLists.txt
src/include/security-server-common.h
src/server/security-server-password.c

index 53bc523..9f96b98 100644 (file)
@@ -33,7 +33,6 @@ SET_SOURCE_FILES_PROPERTIES(
     ${SECURITY_SERVER_SOURCES}
     PROPERTIES
         COMPILE_FLAGS "-D_GNU_SOURCE")
-        # with flag -DSECURITY_SERVER_DEBUG_DLOG debug and warning logs on
 
 INCLUDE_DIRECTORIES(
     ${SECURITY_SERVER_PATH}/include
@@ -80,7 +79,6 @@ SET(SECURITY_CLIENT_SOURCES
 
 ADD_LIBRARY(${TARGET_SECURITY_CLIENT} SHARED ${SECURITY_CLIENT_SOURCES})
 
-# and COMPILE_FLAGS "-DSECURITY_SERVER_DEBUG_DLOG" to turn on debug and warning logs
 SET_TARGET_PROPERTIES(
     ${TARGET_SECURITY_CLIENT}
     PROPERTIES
index 9eb0e41..6c098b1 100644 (file)
@@ -126,7 +126,7 @@ void printhex(const unsigned char *data, int size);
 #endif
 #define LOG_TAG "SECURITY_SERVER"
 #define SEC_SVR_ERR SLOGE
-#if SECURITY_SERVER_DEBUG_DLOG        /* debug msg will be printed by dlog daemon */
+#ifdef BUILD_TYPE_DEBUG        /* debug msg will be printed by dlog daemon */
 #define SEC_SVR_DBG SLOGD
 #define SEC_SVR_WRN SLOGW
 #else /* No debug output */
@@ -142,7 +142,7 @@ void printhex(const unsigned char *data, int size);
 #endif
 #define SECURE_SLOGW(FMT, ARG ...) do { } while(0)
 
-#endif // SECURITY_SERVER_DEBUG_DLOG
+#endif // BUILD_TYPE_DEBUG
 #endif // SECURITY_SERVER_DEBUG_TO_CONSOLE
 
 #ifdef __cplusplus
index fc30d26..087e12f 100644 (file)
@@ -318,11 +318,7 @@ int check_password(const unsigned char *cur_pwd, const unsigned char *requested_
                    const unsigned int max_attempts, const unsigned int expire_time,
                    int *current_attempt)
 {
-/* The following variable is needed only when SECURITY_SERVER_DEBUG_DLOG flag is set     */
-/* If its definition is not surrounded by preprocessor conditionals then it will         */
-/* cause compilation warning "unused variable". Please see the SECURE_SLOGD redefinition */
-/* in "security_server_common.h" header */
-#if SECURITY_SERVER_DEBUG_DLOG
+#ifdef BUILD_TYPE_DEBUG
     unsigned int current_time = time(NULL);
 #endif