diff options
Diffstat (limited to 'OpenSim/Server')
-rw-r--r-- | OpenSim/Server/Base/ServicesServerBase.cs | 43 |
1 files changed, 1 insertions, 42 deletions
diff --git a/OpenSim/Server/Base/ServicesServerBase.cs b/OpenSim/Server/Base/ServicesServerBase.cs index 285168c..15586f8 100644 --- a/OpenSim/Server/Base/ServicesServerBase.cs +++ b/OpenSim/Server/Base/ServicesServerBase.cs | |||
@@ -191,48 +191,7 @@ namespace OpenSim.Server.Base | |||
191 | XmlConfigurator.Configure(); | 191 | XmlConfigurator.Configure(); |
192 | } | 192 | } |
193 | 193 | ||
194 | ILoggerRepository repository = LogManager.GetRepository(); | 194 | RegisterCommonAppenders(startupConfig); |
195 | IAppender[] appenders = repository.GetAppenders(); | ||
196 | |||
197 | foreach (IAppender appender in appenders) | ||
198 | { | ||
199 | if (appender.Name == "Console") | ||
200 | { | ||
201 | consoleAppender = (OpenSimAppender)appender; | ||
202 | } | ||
203 | if (appender.Name == "LogFileAppender") | ||
204 | { | ||
205 | fileAppender = (FileAppender)appender; | ||
206 | } | ||
207 | } | ||
208 | |||
209 | if (consoleAppender == null) | ||
210 | { | ||
211 | System.Console.WriteLine("No console appender found. Server can't start"); | ||
212 | Thread.CurrentThread.Abort(); | ||
213 | } | ||
214 | else | ||
215 | { | ||
216 | consoleAppender.Console = (ConsoleBase)MainConsole.Instance; | ||
217 | |||
218 | if (null == consoleAppender.Threshold) | ||
219 | consoleAppender.Threshold = Level.All; | ||
220 | } | ||
221 | |||
222 | // Set log file | ||
223 | // | ||
224 | if (fileAppender != null) | ||
225 | { | ||
226 | if (startupConfig != null) | ||
227 | { | ||
228 | string cfgFileName = startupConfig.GetString("logfile", null); | ||
229 | if (cfgFileName != null) | ||
230 | { | ||
231 | fileAppender.File = cfgFileName; | ||
232 | fileAppender.ActivateOptions(); | ||
233 | } | ||
234 | } | ||
235 | } | ||
236 | 195 | ||
237 | if (startupConfig.GetString("PIDFile", String.Empty) != String.Empty) | 196 | if (startupConfig.GetString("PIDFile", String.Empty) != String.Empty) |
238 | { | 197 | { |