diff --git a/CMakeLists.txt b/CMakeLists.txt index ea3924ab1..b6094853f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -117,11 +117,16 @@ else (NOT GVM_STATE_DIR) set (GVM_STATE_DIR "${GVM_STATE_DIR}") endif (NOT GVM_STATE_DIR) -if (NOT GVM_LOG_DIR) - set (GVM_LOG_DIR "${LOCALSTATEDIR}/log/gvm") -else (NOT GVM_LOG_DIR) - set (GVM_LOG_DIR "${GVM_LOG_DIR}") -endif (NOT GVM_LOG_DIR) +if (NOT GSAD_LOG_FILE) + if (GVM_LOG_DIR) + set (GSAD_LOG_FILE "${GVM_LOG_DIR}/gsad.log") + else (GVM_LOG_DIR) + set (GSAD_LOG_FILE "-") + endif (GVM_LOG_DIR) +else (NOT GSAD_LOG_FILE) + set (GSAD_LOG_FILE "${GSAD_LOG_FILE}") +endif (NOT GSAD_LOG_FILE) +message ("-- Log file: ${GSAD_LOG_FILE}") if (NOT GVM_SERVER_CERTIFICATE) set (GVM_SERVER_CERTIFICATE "${GVM_STATE_DIR}/CA/servercert.pem") diff --git a/src/gsad_log_conf.cmake_in b/src/gsad_log_conf.cmake_in index 3e1f5c5fd..b79fce145 100644 --- a/src/gsad_log_conf.cmake_in +++ b/src/gsad_log_conf.cmake_in @@ -7,40 +7,40 @@ prepend=%t %s %p separator=: prepend_time_format=%Y-%m-%d %Hh%M.%S %Z -file=${GVM_LOG_DIR}/gsad.log +file=${GSAD_LOG_FILE} level=127 [gsad gmp] prepend=%t %s %p separator=: prepend_time_format=%Y-%m-%d %Hh%M.%S %Z -file=${GVM_LOG_DIR}/gsad.log +file=${GSAD_LOG_FILE} level=127 [gsad i18n] prepend=%t %s %p separator=: prepend_time_format=%Y-%m-%d %Hh%M.%S %Z -file=${GVM_LOG_DIR}/gsad.log +file=${GSAD_LOG_FILE} level=127 [gsad http] prepend=%t %s %p separator=: prepend_time_format=%Y-%m-%d %Hh%M.%S %Z -file=${GVM_LOG_DIR}/gsad.log +file=${GSAD_LOG_FILE} level=127 [gsad vali] prepend=%t %s %p separator=: prepend_time_format=%Y-%m-%d %Hh%M.%S %Z -file=${GVM_LOG_DIR}/gsad.log +file=${GSAD_LOG_FILE} level=127 [*] prepend=%t %s %p separator=: prepend_time_format=%Y-%m-%d %Hh%M.%S %Z -file=${GVM_LOG_DIR}/gsad.log +file=${GSAD_LOG_FILE} level=0