summaryrefslogtreecommitdiffstats
path: root/src/zabbix_server/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/zabbix_server/server.c')
-rw-r--r--src/zabbix_server/server.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/zabbix_server/server.c b/src/zabbix_server/server.c
index 6ad642ac..e7148329 100644
--- a/src/zabbix_server/server.c
+++ b/src/zabbix_server/server.c
@@ -277,6 +277,15 @@ void daemon_init(void)
}
+ if(CONFIG_LOG_FILE == NULL)
+ {
+ zabbix_open_log(LOG_TYPE_SYSLOG,CONFIG_LOG_LEVEL,NULL);
+ }
+ else
+ {
+ zabbix_open_log(LOG_TYPE_FILE,CONFIG_LOG_LEVEL,CONFIG_LOG_FILE);
+ }
+
if( (pid = fork()) != 0 )
{
exit( 0 );
@@ -612,14 +621,15 @@ int main(int argc, char **argv)
sigaction(SIGTERM, &phan, NULL);
sigaction(SIGPIPE, &phan, NULL);
- if(CONFIG_LOG_FILE == NULL)
+/* Moved to daemon_init() */
+/* if(CONFIG_LOG_FILE == NULL)
{
zabbix_open_log(LOG_TYPE_SYSLOG,CONFIG_LOG_LEVEL,NULL);
}
else
{
zabbix_open_log(LOG_TYPE_FILE,CONFIG_LOG_LEVEL,CONFIG_LOG_FILE);
- }
+ }*/
if( FAIL == create_pid_file(CONFIG_PID_FILE))
{