Clean up log file handling. Fixes bug #63
authorAlan T. DeKok <aland@freeradius.org>
Fri, 26 Feb 2010 10:11:02 +0000 (11:11 +0100)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 26 Feb 2010 10:11:02 +0000 (11:11 +0100)
commit6563dac620fdee7bfe634c94e3adc422a078d6ee
treeb57c8bf088d574fca605c25abcc5396324e3ca2c
parent29fcdf4c4ad53383522c4eaccfc640276edc19be
Clean up log file handling.  Fixes bug #63

We now open the log file from the option parsing (-l file)
OR in mainconfig.c.  That way, the code in log.c can assume that
there is ALWAYS a log file, and it doesn't need to open one.  This
simplifies log.c substantially.

We also moved the syslog "openlog" code from log.c to mainconfig.c
This again makes it simpler.

On HUP, the hup_mainconfig() function takes care of re-opening the
log file.  This is so that the log.c functions don't have to do it.
src/main/event.c
src/main/mainconfig.c
src/main/radiusd.c