summaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-10-14 14:14:15 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-10-14 14:14:15 +0000
commit43d549b4e105083811430c5e4275f2fa077657d7 (patch)
treee9df0aa632e7b33fa6c14b5031d15ef397858f87 /src/inspircd.cpp
parentc7be785d64e5b8bd4c4a1019905519e60a542ec4 (diff)
move opening of log before opening of config so that failure to open the config can be logged
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8179 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r--src/inspircd.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index fedc8149f..3149d74ea 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -397,6 +397,14 @@ InspIRCd::InspIRCd(int argc, char** argv)
ChangeWindowsSpecificPointers(this);
#endif
+ strlcpy(Config->MyExecutable,argv[0],MAXBUF);
+
+ if (!this->OpenLog(argv, argc))
+ {
+ printf("ERROR: Could not open logfile %s: %s\n\n", Config->logpath.c_str(), strerror(errno));
+ Exit(EXIT_STATUS_LOG);
+ }
+
if (!ServerConfig::FileExists(this->ConfigFileName))
{
printf("ERROR: Cannot open config file: %s\nExiting...\n", this->ConfigFileName);
@@ -414,14 +422,6 @@ InspIRCd::InspIRCd(int argc, char** argv)
Config->forcedebug = do_debug;
Config->writelog = !do_nolog;
- strlcpy(Config->MyExecutable,argv[0],MAXBUF);
-
- if (!this->OpenLog(argv, argc))
- {
- printf("ERROR: Could not open logfile %s: %s\n\n", Config->logpath.c_str(), strerror(errno));
- Exit(EXIT_STATUS_LOG);
- }
-
this->Modules = new ModuleManager(this);
this->stats = new serverstats();
this->Timers = new TimerManager(this);