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 11:05:32 +0000 (12:05 +0100)
commitc8a5624e1f5ea71b564f626337c56b8cfd86a775
treef26bf7bc7f53a2155e43edeb25e81277e6d0ae3d
parent9a6edfe42404bb0532a24927cb20180444fd42d0
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