1 /* Copyright (C) 2009 Trend Micro Inc.
4 * This program is a free software; you can redistribute it
5 * and/or modify it under the terms of the GNU General Public
6 * License (version 2) as published by the FSF - Free Software
11 #include "logcollector.h"
14 /* Read the config file (the localfiles) */
15 int LogCollectorConfig(const char *cfgfile, int accept_remote)
18 logreader_config log_config;
20 modules |= CLOCALFILE;
22 log_config.config = NULL;
23 log_config.agent_cfg = 0;
24 log_config.accept_remote = accept_remote;
26 if (ReadConfig(modules, cfgfile, &log_config, NULL) < 0) {
31 modules |= CAGENT_CONFIG;
32 log_config.agent_cfg = 1;
33 ReadConfig(modules, AGENTCONFIG, &log_config, NULL);
34 log_config.agent_cfg = 0;
37 logff = log_config.config;