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/Util.cs | |
parent | Skip region restart messages and delays when there are no root agents (diff) | |
download | opensim-SC-adcb1d8798c0404d0c9f894d1b33003557066123.zip opensim-SC-adcb1d8798c0404d0c9f894d1b33003557066123.tar.gz opensim-SC-adcb1d8798c0404d0c9f894d1b33003557066123.tar.bz2 opensim-SC-adcb1d8798c0404d0c9f894d1b33003557066123.tar.xz |
Allow setting the stats log file location in OpenSim.ini rather than app.exe.config
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Util.cs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 0037f4f..dcb660a 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -1190,7 +1190,7 @@ namespace OpenSim.Framework | |||
1190 | { | 1190 | { |
1191 | foreach (IAppender appender in LogManager.GetRepository().GetAppenders()) | 1191 | foreach (IAppender appender in LogManager.GetRepository().GetAppenders()) |
1192 | { | 1192 | { |
1193 | if (appender is FileAppender) | 1193 | if (appender is FileAppender && appender.Name == "LogFileAppender") |
1194 | { | 1194 | { |
1195 | return ((FileAppender)appender).File; | 1195 | return ((FileAppender)appender).File; |
1196 | } | 1196 | } |
@@ -1199,6 +1199,19 @@ namespace OpenSim.Framework | |||
1199 | return "./OpenSim.log"; | 1199 | return "./OpenSim.log"; |
1200 | } | 1200 | } |
1201 | 1201 | ||
1202 | public static string statsLogFile() | ||
1203 | { | ||
1204 | foreach (IAppender appender in LogManager.GetRepository().GetAppenders()) | ||
1205 | { | ||
1206 | if (appender is FileAppender && appender.Name == "StatsLogFileAppender") | ||
1207 | { | ||
1208 | return ((FileAppender)appender).File; | ||
1209 | } | ||
1210 | } | ||
1211 | |||
1212 | return "./OpenSimStats.log"; | ||
1213 | } | ||
1214 | |||
1202 | public static string logDir() | 1215 | public static string logDir() |
1203 | { | 1216 | { |
1204 | return Path.GetDirectoryName(logFile()); | 1217 | return Path.GetDirectoryName(logFile()); |