Skip to content

Commit

Permalink
Merge pull request #399 from nodogsplash/syslog
Browse files Browse the repository at this point in the history
Write log to SYSLOG. Make debuglevel 0 silent except for LOG_ERR
  • Loading branch information
bluewavenet committed Jul 29, 2019
2 parents d1b4112 + 27e8604 commit 0cc5cf0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion openwrt/nodogsplash/files/etc/init.d/nodogsplash
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ USE_PROCD=1

IPT=/usr/sbin/iptables
WD_DIR=/usr/bin
OPTIONS="-f -d 1"

# Run in PROCD (-f) and log to SYSLOG (-s)
OPTIONS="-f -s"
#

CONFIG=""


Expand Down
4 changes: 2 additions & 2 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,15 +409,15 @@ int main(int argc, char **argv)
parse_commandline(argc, argv);

/* Initialize the config */
debug(LOG_NOTICE, "Reading and validating configuration file %s", config->configfile);
debug(LOG_INFO, "Reading and validating configuration file %s", config->configfile);
config_read(config->configfile);
config_validate();

// Initializes the linked list of connected clients
client_list_init();

// Init the signals to catch chld/quit/etc
debug(LOG_NOTICE, "Initializing signal handlers");
debug(LOG_INFO, "Initializing signal handlers");
init_signals();

if (config->daemon) {
Expand Down

0 comments on commit 0cc5cf0

Please sign in to comment.