aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authoronefang2019-05-19 22:15:41 +1000
committeronefang2019-05-19 22:15:41 +1000
commit295e91b8f44a356ab742dedd27c1b7edfe7b1157 (patch)
treede336b1b137c27f94bd4e0a2fb63bea9b1de60e2 /OpenSim/Framework
parentMove db directory out of tree. (diff)
downloadopensim-SC_OLD-295e91b8f44a356ab742dedd27c1b7edfe7b1157.zip
opensim-SC_OLD-295e91b8f44a356ab742dedd27c1b7edfe7b1157.tar.gz
opensim-SC_OLD-295e91b8f44a356ab742dedd27c1b7edfe7b1157.tar.bz2
opensim-SC_OLD-295e91b8f44a356ab742dedd27c1b7edfe7b1157.tar.xz
Move cache, config, logs out of tree, and various related clean ups.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Console/LocalConsole.cs4
-rw-r--r--OpenSim/Framework/Util.cs15
2 files changed, 15 insertions, 4 deletions
diff --git a/OpenSim/Framework/Console/LocalConsole.cs b/OpenSim/Framework/Console/LocalConsole.cs
index 73f0323..fac346a 100644
--- a/OpenSim/Framework/Console/LocalConsole.cs
+++ b/OpenSim/Framework/Console/LocalConsole.cs
@@ -95,9 +95,9 @@ namespace OpenSim.Framework.Console
95 return; 95 return;
96 } 96 }
97 97
98 string m_historyFile = startupConfig.GetString("ConsoleHistoryFile", "OpenSimConsoleHistory.txt"); 98 string m_historyFile = startupConfig.GetString("ConsoleHistoryFile", Path.Combine(Util.logsDir(), "OpenSimConsoleHistory.txt"));
99 int m_historySize = startupConfig.GetInt("ConsoleHistoryFileLines", 100); 99 int m_historySize = startupConfig.GetInt("ConsoleHistoryFileLines", 100);
100 m_historyPath = Path.GetFullPath(Path.Combine(Util.configDir(), m_historyFile)); 100 m_historyPath = Path.GetFullPath(m_historyFile);
101 m_log.InfoFormat("[LOCAL CONSOLE]: Persistent command line history is Enabled, up to {0} lines from file {1}", m_historySize, m_historyPath); 101 m_log.InfoFormat("[LOCAL CONSOLE]: Persistent command line history is Enabled, up to {0} lines from file {1}", m_historySize, m_historyPath);
102 102
103 if (File.Exists(m_historyPath)) 103 if (File.Exists(m_historyPath))
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 2f65f3c..a448b31 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -1282,8 +1282,14 @@ namespace OpenSim.Framework
1282 return Path.Combine("..", Path.Combine("..", "db")); 1282 return Path.Combine("..", Path.Combine("..", "db"));
1283 } 1283 }
1284 1284
1285 public static string cacheDir()
1286 {
1287 return Path.Combine("..", Path.Combine("..", "caches"));
1288 }
1289
1285 public static string configDir() 1290 public static string configDir()
1286 { 1291 {
1292// return Path.Combine("..", Path.Combine("..", "config"));
1287 return "."; 1293 return ".";
1288 } 1294 }
1289 1295
@@ -1292,6 +1298,11 @@ namespace OpenSim.Framework
1292 return "."; 1298 return ".";
1293 } 1299 }
1294 1300
1301 public static string logsDir()
1302 {
1303 return Path.Combine("..", "logs");
1304 }
1305
1295 public static string logFile() 1306 public static string logFile()
1296 { 1307 {
1297 foreach (IAppender appender in LogManager.GetRepository().GetAppenders()) 1308 foreach (IAppender appender in LogManager.GetRepository().GetAppenders())
@@ -1302,7 +1313,7 @@ namespace OpenSim.Framework
1302 } 1313 }
1303 } 1314 }
1304 1315
1305 return "./OpenSim.log"; 1316 return Path.Combine(logsDir(), "OpenSim.log");
1306 } 1317 }
1307 1318
1308 public static string statsLogFile() 1319 public static string statsLogFile()
@@ -1315,7 +1326,7 @@ namespace OpenSim.Framework
1315 } 1326 }
1316 } 1327 }
1317 1328
1318 return "./OpenSimStats.log"; 1329 return Path.Combine(logsDir(), "OpenSimStats.log");
1319 } 1330 }
1320 1331
1321 public static string logDir() 1332 public static string logDir()