diff options
Diffstat (limited to 'OpenSim/Framework/Servers')
-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> |