Use a file for the default log (instead of syslog).

Fixes #5119
This commit is contained in:
Gunnar Beutner 2013-11-21 12:20:54 +01:00
parent 91338a7e49
commit ab388ce837
4 changed files with 16 additions and 4 deletions

View File

@ -36,6 +36,7 @@ install_if_not_exists(icinga2/features-available/graphite.conf ${CMAKE_INSTALL_S
install_if_not_exists(icinga2/features-available/ido-mysql.conf ${CMAKE_INSTALL_SYSCONFDIR}/icinga2/features-available)
install_if_not_exists(icinga2/features-available/ido-pgsql.conf ${CMAKE_INSTALL_SYSCONFDIR}/icinga2/features-available)
install_if_not_exists(icinga2/features-available/livestatus.conf ${CMAKE_INSTALL_SYSCONFDIR}/icinga2/features-available)
install_if_not_exists(icinga2/features-available/mainlog.conf ${CMAKE_INSTALL_SYSCONFDIR}/icinga2/features-available)
install_if_not_exists(icinga2/features-available/notification.conf ${CMAKE_INSTALL_SYSCONFDIR}/icinga2/features-available)
install_if_not_exists(icinga2/features-available/perfdata.conf ${CMAKE_INSTALL_SYSCONFDIR}/icinga2/features-available)
install_if_not_exists(icinga2/features-available/statusdata.conf ${CMAKE_INSTALL_SYSCONFDIR}/icinga2/features-available)
@ -44,7 +45,7 @@ install_if_not_exists(icinga2/features-available/syslog.conf ${CMAKE_INSTALL_SYS
install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_SYSCONFDIR}/icinga2/features-enabled\")")
install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink ../features-available/checker.conf \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_SYSCONFDIR}/icinga2/features-enabled/checker.conf\")")
install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink ../features-available/notification.conf \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_SYSCONFDIR}/icinga2/features-enabled/notification.conf\")")
install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink ../features-available/syslog.conf \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_SYSCONFDIR}/icinga2/features-enabled/syslog.conf\")")
install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink ../features-available/mainlog.conf \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_SYSCONFDIR}/icinga2/features-enabled/mainlog.conf\")")
if(NOT WIN32)
configure_file(init.d/icinga2.cmake ${CMAKE_CURRENT_BINARY_DIR}/init.d/icinga2)

View File

@ -1,9 +1,11 @@
/**
* The FileLogger type writes log information to a log file.
* Unlike the mainlog feature this sets up a logger
* with severity "debug".
*/
object FileLogger "debug-file" {
severity = "debug",
path = "/var/log/icinga2/debug.log"
path = (IcingaLocalStateDir + "/log/icinga2/debug.log"
}

View File

@ -6,6 +6,6 @@
library "perfdata"
object GraphiteWriter "graphite" {
// host = "127.0.0.1",
// port = 2003
//host = "127.0.0.1",
//port = 2003
}

View File

@ -0,0 +1,9 @@
/**
* The FileLogger type writes log information to a file.
*/
object FileLogger "main-log" {
severity = "information",
path = (IcingaLocalStateDir + "/log/icinga2/icinga2.log")
}