Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change: Log to stderr, new log file build option. #184

Merged
merged 4 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
mattmundell marked this conversation as resolved.
Show resolved Hide resolved
else (GVM_LOG_DIR)
set (GSAD_LOG_FILE "-")
endif (GVM_LOG_DIR)
else (NOT GSAD_LOG_FILE)
set (GSAD_LOG_FILE "${GSAD_LOG_FILE}")
mattmundell marked this conversation as resolved.
Show resolved Hide resolved
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")
Expand Down
12 changes: 6 additions & 6 deletions src/gsad_log_conf.cmake_in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading