Skip to content

Commit

Permalink
Merge pull request #2313 from greenbone/GEA-420_Log_to_stderror
Browse files Browse the repository at this point in the history
Change: Log to stderr, new log file build option.
  • Loading branch information
mattmundell authored Nov 13, 2024
2 parents b6559f8 + 3f62992 commit f207cc4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
13 changes: 8 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,13 @@ if (NOT GVMD_STATE_DIR)
set (GVMD_STATE_DIR "${GVM_STATE_DIR}/gvmd")
endif (NOT GVMD_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 GVMD_LOG_FILE)
if (GVM_LOG_DIR)
set (GVMD_LOG_FILE "${GVM_LOG_DIR}/gvmd.log")
else (GVM_LOG_DIR)
set (GVMD_LOG_FILE "-")
endif (GVM_LOG_DIR)
endif (NOT GVMD_LOG_FILE)

set (GVM_SCAP_RES_DIR "${GVM_DATA_DIR}/scap")
set (GVM_CERT_RES_DIR "${GVM_DATA_DIR}/cert")
Expand Down Expand Up @@ -248,6 +250,7 @@ endif (NOT CVSS3_RATINGS)
add_definitions (-DCVSS3_RATINGS=${CVSS3_RATINGS})

message ("-- Install prefix: ${CMAKE_INSTALL_PREFIX}")
message ("-- Log file: ${GVMD_LOG_FILE}")

## Version

Expand Down
20 changes: 10 additions & 10 deletions src/gvmd_log_conf.cmake_in
Original file line number Diff line number Diff line change
Expand Up @@ -7,63 +7,63 @@
prepend=%t %s %p
separator=:
prepend_time_format=%Y-%m-%d %Hh%M.%S %Z
file=${GVM_LOG_DIR}/gvmd.log
file=${GVMD_LOG_FILE}
level=127

[md manage]
prepend=%t %s %p
separator=:
prepend_time_format=%Y-%m-%d %Hh%M.%S %Z
file=${GVM_LOG_DIR}/gvmd.log
file=${GVMD_LOG_FILE}
level=127

[md gmp]
prepend=%t %s %p
separator=:
prepend_time_format=%Y-%m-%d %Hh%M.%S %Z
file=${GVM_LOG_DIR}/gvmd.log
file=${GVMD_LOG_FILE}
level=127

[md crypt]
prepend=%t %s %p
separator=:
prepend_time_format=%Y-%m-%d %Hh%M.%S %Z
file=${GVM_LOG_DIR}/gvmd.log
file=${GVMD_LOG_FILE}
level=127

[md utils]
prepend=%t %s %p
separator=:
prepend_time_format=%Y-%m-%d %Hh%M.%S %Z
file=${GVM_LOG_DIR}/gvmd.log
file=${GVMD_LOG_FILE}
level=127

[libgvm base]
prepend=%t %s %p
separator=:
prepend_time_format=%Y-%m-%d %Hh%M.%S %Z
file=${GVM_LOG_DIR}/gvmd.log
file=${GVMD_LOG_FILE}
level=127

[libgvm gmp]
prepend=%t %s %p
separator=:
prepend_time_format=%Y-%m-%d %Hh%M.%S %Z
file=${GVM_LOG_DIR}/gvmd.log
file=${GVMD_LOG_FILE}
level=127

[libgvm osp]
prepend=%t %s %p
separator=:
prepend_time_format=%Y-%m-%d %Hh%M.%S %Z
file=${GVM_LOG_DIR}/gvmd.log
file=${GVMD_LOG_FILE}
level=127

[libgvm util]
prepend=%t %s %p
separator=:
prepend_time_format=%Y-%m-%d %Hh%M.%S %Z
file=${GVM_LOG_DIR}/gvmd.log
file=${GVMD_LOG_FILE}
level=127

[event syslog]
Expand All @@ -86,5 +86,5 @@ level=128
prepend=%t %s %p
separator=:
prepend_time_format=%Y-%m-%d %Hh%M.%S %Z
file=${GVM_LOG_DIR}/gvmd.log
file=${GVMD_LOG_FILE}
level=127

0 comments on commit f207cc4

Please sign in to comment.