From 599a6d32eebc451f9284db8e6abf2946f236d5e9 Mon Sep 17 00:00:00 2001 From: Brian McBee Date: Fri, 3 Aug 2007 18:01:55 +0000 Subject: Changes to prepare for future possible configuration of separate logdir, configdir, datadir. --- OpenSim/Grid/GridServer/Main.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'OpenSim/Grid/GridServer/Main.cs') diff --git a/OpenSim/Grid/GridServer/Main.cs b/OpenSim/Grid/GridServer/Main.cs index f9accab..ecf3b9d 100644 --- a/OpenSim/Grid/GridServer/Main.cs +++ b/OpenSim/Grid/GridServer/Main.cs @@ -27,6 +27,7 @@ */ using System; +using System.IO; using System.Reflection; using System.Threading; using System.Timers; @@ -34,6 +35,7 @@ using OpenSim.Framework.Console; using OpenSim.Framework.Interfaces; using OpenSim.Framework.Servers; using OpenSim.Framework.Configuration; +using OpenSim.Framework.Utilities; using Timer=System.Timers.Timer; @@ -84,7 +86,11 @@ namespace OpenSim.Grid.GridServer private OpenGrid_Main() { - m_console = new LogBase("opengrid-gridserver-console.log", "OpenGrid", this, false); + if (!Directory.Exists(Util.logDir())) + { + Directory.CreateDirectory(Util.logDir()); + } + m_console = new LogBase((Path.Combine(Util.logDir(),"opengrid-gridserver-console.log")), "OpenGrid", this, false); MainLog.Instance = m_console; @@ -104,7 +110,7 @@ namespace OpenSim.Grid.GridServer public void Startup() { - this.Cfg = new GridConfig("GRID SERVER","GridServer_Config.xml"); //Yeah srsly, that's it. + this.Cfg = new GridConfig("GRID SERVER",(Path.Combine(Util.configDir(),"GridServer_Config.xml"))); //Yeah srsly, that's it. if (setuponly) Environment.Exit(0); m_console.Verbose( "Main.cs:Startup() - Connecting to Storage Server"); -- cgit v1.1