diff options
author | Melanie Thielker | 2017-02-24 01:33:02 +0000 |
---|---|---|
committer | Melanie Thielker | 2017-03-31 14:38:41 +0100 |
commit | adcb1d8798c0404d0c9f894d1b33003557066123 (patch) | |
tree | e60ce0a26972d92c86661d6ab54a62e3b2f00ed4 /OpenSim/Framework/Servers/ServerBase.cs | |
parent | Skip region restart messages and delays when there are no root agents (diff) | |
download | opensim-SC_OLD-adcb1d8798c0404d0c9f894d1b33003557066123.zip opensim-SC_OLD-adcb1d8798c0404d0c9f894d1b33003557066123.tar.gz opensim-SC_OLD-adcb1d8798c0404d0c9f894d1b33003557066123.tar.bz2 opensim-SC_OLD-adcb1d8798c0404d0c9f894d1b33003557066123.tar.xz |
Allow setting the stats log file location in OpenSim.ini rather than app.exe.config
Diffstat (limited to 'OpenSim/Framework/Servers/ServerBase.cs')
-rw-r--r-- | OpenSim/Framework/Servers/ServerBase.cs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/OpenSim/Framework/Servers/ServerBase.cs b/OpenSim/Framework/Servers/ServerBase.cs index 8965e71..f627ae6 100644 --- a/OpenSim/Framework/Servers/ServerBase.cs +++ b/OpenSim/Framework/Servers/ServerBase.cs | |||
@@ -57,6 +57,7 @@ namespace OpenSim.Framework.Servers | |||
57 | 57 | ||
58 | protected OpenSimAppender m_consoleAppender; | 58 | protected OpenSimAppender m_consoleAppender; |
59 | protected FileAppender m_logFileAppender; | 59 | protected FileAppender m_logFileAppender; |
60 | protected FileAppender m_statsLogFileAppender; | ||
60 | 61 | ||
61 | protected DateTime m_startuptime; | 62 | protected DateTime m_startuptime; |
62 | protected string m_startupDirectory = Environment.CurrentDirectory; | 63 | protected string m_startupDirectory = Environment.CurrentDirectory; |
@@ -156,6 +157,10 @@ namespace OpenSim.Framework.Servers | |||
156 | { | 157 | { |
157 | m_logFileAppender = (FileAppender)appender; | 158 | m_logFileAppender = (FileAppender)appender; |
158 | } | 159 | } |
160 | else if (appender.Name == "StatsLogFileAppender") | ||
161 | { | ||
162 | m_statsLogFileAppender = (FileAppender)appender; | ||
163 | } | ||
159 | } | 164 | } |
160 | 165 | ||
161 | if (null == m_consoleAppender) | 166 | if (null == m_consoleAppender) |
@@ -185,6 +190,18 @@ namespace OpenSim.Framework.Servers | |||
185 | 190 | ||
186 | m_log.InfoFormat("[SERVER BASE]: Logging started to file {0}", m_logFileAppender.File); | 191 | m_log.InfoFormat("[SERVER BASE]: Logging started to file {0}", m_logFileAppender.File); |
187 | } | 192 | } |
193 | |||
194 | if (m_statsLogFileAppender != null && startupConfig != null) | ||
195 | { | ||
196 | string cfgStatsFileName = startupConfig.GetString("StatsLogFile", null); | ||
197 | if (cfgStatsFileName != null) | ||
198 | { | ||
199 | m_statsLogFileAppender.File = cfgStatsFileName; | ||
200 | m_statsLogFileAppender.ActivateOptions(); | ||
201 | } | ||
202 | |||
203 | m_log.InfoFormat("[SERVER BASE]: Stats Logging started to file {0}", m_statsLogFileAppender.File); | ||
204 | } | ||
188 | } | 205 | } |
189 | 206 | ||
190 | /// <summary> | 207 | /// <summary> |