EXTERM-INATED. (Add warnings produced by WriteLine change have been updated to include Log Priority)

zircon^2
Adam Frisby 2007-05-12 15:44:10 +00:00
parent bd05850be1
commit ec1901e4b8
11 changed files with 78 additions and 81 deletions

View File

@ -36,7 +36,7 @@ namespace OpenGrid.Config.GridConfigDb4o
{
public GridConfig GetConfigObject()
{
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Loading Db40Config dll");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Loading Db40Config dll");
return ( new DbGridConfig());
}
}
@ -46,7 +46,7 @@ namespace OpenGrid.Config.GridConfigDb4o
private IObjectContainer db;
public void LoadDefaults() {
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Config.cs:LoadDefaults() - Please press enter to retain default or enter new settings");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,"Config.cs:LoadDefaults() - Please press enter to retain default or enter new settings");
this.GridOwner = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid owner", "OGS development team");
@ -67,7 +67,7 @@ namespace OpenGrid.Config.GridConfigDb4o
db = Db4oFactory.OpenFile("opengrid.yap");
IObjectSet result = db.Get(typeof(DbGridConfig));
if(result.Count==1) {
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Config.cs:InitConfig() - Found a GridConfig object in the local database, loading");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Config.cs:InitConfig() - Found a GridConfig object in the local database, loading");
foreach (DbGridConfig cfg in result) {
this.GridOwner=cfg.GridOwner;
this.DefaultAssetServer=cfg.DefaultAssetServer;
@ -80,27 +80,27 @@ namespace OpenGrid.Config.GridConfigDb4o
this.SimRecvKey=cfg.SimRecvKey;
}
} else {
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Config.cs:InitConfig() - Could not find object in database, loading precompiled defaults");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Config.cs:InitConfig() - Could not find object in database, loading precompiled defaults");
LoadDefaults();
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Writing out default settings to local database");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Writing out default settings to local database");
db.Set(this);
db.Close();
}
} catch(Exception e) {
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Config.cs:InitConfig() - Exception occured");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(e.ToString());
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"Config.cs:InitConfig() - Exception occured");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,e.ToString());
}
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Grid settings loaded:");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Grid owner: " + this.GridOwner);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Default asset server: " + this.DefaultAssetServer);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Key to send to asset server: " + this.AssetSendKey);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Key to expect from asset server: " + this.AssetRecvKey);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Default user server: " + this.DefaultUserServer);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Key to send to user server: " + this.UserSendKey);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Key to expect from user server: " + this.UserRecvKey);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Key to send to sims: " + this.SimSendKey);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Key to expect from sims: " + this.SimRecvKey);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Grid settings loaded:");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Grid owner: " + this.GridOwner);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Default asset server: " + this.DefaultAssetServer);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Key to send to asset server: " + this.AssetSendKey);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Key to expect from asset server: " + this.AssetRecvKey);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Default user server: " + this.DefaultUserServer);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Key to send to user server: " + this.UserSendKey);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Key to expect from user server: " + this.UserRecvKey);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Key to send to sims: " + this.SimSendKey);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Key to expect from sims: " + this.SimRecvKey);
}

View File

@ -70,7 +70,7 @@ namespace OpenGridServices.AssetServer
private void Work()
{
m_console.WriteLine("\nEnter help for a list of commands\n");
m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,"\nEnter help for a list of commands\n");
while (true)
{
@ -86,10 +86,10 @@ namespace OpenGridServices.AssetServer
public void Startup()
{
m_console.WriteLine("Main.cs:Startup() - Setting up asset DB");
m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Setting up asset DB");
setupDB();
m_console.WriteLine("Main.cs:Startup() - Starting HTTP process");
m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Starting HTTP process");
BaseHttpServer httpServer = new BaseHttpServer(8003);
@ -137,13 +137,13 @@ namespace OpenGridServices.AssetServer
try
{
db = Db4oFactory.OpenFile("assets.yap");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Main.cs:setupDB() - creation");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:setupDB() - creation");
}
catch (Exception e)
{
db.Close();
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Main.cs:setupDB() - Exception occured");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(e.ToString());
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"Main.cs:setupDB() - Exception occured");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,e.ToString());
}
if (!yapfile)
{
@ -291,7 +291,7 @@ namespace OpenGridServices.AssetServer
switch (cmd)
{
case "help":
m_console.WriteLine("shutdown - shutdown this asset server (USE CAUTION!)");
m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,"shutdown - shutdown this asset server (USE CAUTION!)");
break;
case "shutdown":

View File

@ -24,10 +24,10 @@ namespace OpenGridServices.GridServer
/// <param name="FileName">The filename to the grid server plugin DLL</param>
public void AddPlugin(string FileName)
{
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Storage: Attempting to load " + FileName);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Storage: Attempting to load " + FileName);
Assembly pluginAssembly = Assembly.LoadFrom(FileName);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Storage: Found " + pluginAssembly.GetTypes().Length + " interfaces.");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Storage: Found " + pluginAssembly.GetTypes().Length + " interfaces.");
foreach (Type pluginType in pluginAssembly.GetTypes())
{
if (!pluginType.IsAbstract)
@ -39,7 +39,7 @@ namespace OpenGridServices.GridServer
IGridData plug = (IGridData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
plug.Initialise();
this._plugins.Add(plug.getName(), plug);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Storage: Added IGridData Interface");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Storage: Added IGridData Interface");
}
typeInterface = null;
@ -63,7 +63,7 @@ namespace OpenGridServices.GridServer
}
catch (Exception e)
{
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Storage: Unable to find region " + uuid.ToStringHyphenated() + " via " + kvp.Key);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.NORMAL,"Storage: Unable to find region " + uuid.ToStringHyphenated() + " via " + kvp.Key);
}
}
return null;
@ -84,7 +84,7 @@ namespace OpenGridServices.GridServer
}
catch (Exception e)
{
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Storage: Unable to find region " + handle.ToString() + " via " + kvp.Key);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.NORMAL,"Storage: Unable to find region " + handle.ToString() + " via " + kvp.Key);
}
}
return null;
@ -321,17 +321,17 @@ namespace OpenGridServices.GridServer
try
{
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Attempting to add a new region to the grid - " + _plugins.Count + " storage provider(s) registered.");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Attempting to add a new region to the grid - " + _plugins.Count + " storage provider(s) registered.");
foreach (KeyValuePair<string, IGridData> kvp in _plugins)
{
try
{
kvp.Value.AddProfile(TheSim);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("New sim added to grid (" + TheSim.regionName + ")");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"New sim added to grid (" + TheSim.regionName + ")");
}
catch (Exception e)
{
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("getRegionPlugin Handle " + kvp.Key + " unable to add new sim: " + e.ToString());
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"getRegionPlugin Handle " + kvp.Key + " unable to add new sim: " + e.ToString());
}
}
return "OK";

View File

@ -73,7 +73,7 @@ namespace OpenGridServices.GridServer
private void Work()
{
m_console.WriteLine("\nEnter help for a list of commands\n");
m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,"\nEnter help for a list of commands\n");
while (true)
{
@ -91,16 +91,16 @@ namespace OpenGridServices.GridServer
public void Startup()
{
m_console.WriteLine("Main.cs:Startup() - Loading configuration");
m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Loading configuration");
Cfg = this.LoadConfigDll(this.ConfigDll);
Cfg.InitConfig();
m_console.WriteLine("Main.cs:Startup() - Connecting to Storage Server");
m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Connecting to Storage Server");
m_gridManager = new GridManager();
m_gridManager.AddPlugin(GridDll); // Made of win
m_gridManager.defaultRecvKey = Cfg.SimRecvKey;
m_console.WriteLine("Main.cs:Startup() - Starting HTTP process");
m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Starting HTTP process");
BaseHttpServer httpServer = new BaseHttpServer(8001);
httpServer.AddXmlRPCHandler("simulator_login", m_gridManager.XmlRpcLoginToSimulatorMethod);
@ -127,7 +127,7 @@ namespace OpenGridServices.GridServer
httpServer.Start();
m_console.WriteLine("Main.cs:Startup() - Starting sim status checker");
m_console.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Starting sim status checker");
Timer simCheckTimer = new Timer( 300000 ); // 5 minutes
simCheckTimer.Elapsed += new ElapsedEventHandler(CheckSims);
@ -204,7 +204,7 @@ namespace OpenGridServices.GridServer
switch (cmd)
{
case "help":
m_console.WriteLine("shutdown - shutdown the grid (USE CAUTION!)");
m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,"shutdown - shutdown the grid (USE CAUTION!)");
break;
case "shutdown":

View File

@ -74,7 +74,7 @@ namespace OpenGridServices.UserServer
private void Work()
{
m_console.WriteLine("\nEnter help for a list of commands\n");
m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,"\nEnter help for a list of commands\n");
while (true)
{
@ -84,24 +84,21 @@ namespace OpenGridServices.UserServer
public void Startup()
{
MainConsole.Instance.WriteLine("Main.cs:Startup() - Loading configuration");
MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Loading configuration");
Cfg = this.LoadConfigDll(this.ConfigDll);
Cfg.InitConfig();
MainConsole.Instance.WriteLine("Main.cs:Startup() - Creating user profile manager");
MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Creating user profile manager");
m_userProfileManager = new UserProfileManager();
m_userProfileManager.InitUserProfiles();
m_userProfileManager.SetKeys(Cfg.GridSendKey, Cfg.GridRecvKey, Cfg.GridServerURL, Cfg.DefaultStartupMsg);
MainConsole.Instance.WriteLine("Main.cs:Startup() - Starting HTTP process");
MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Main.cs:Startup() - Starting HTTP process");
BaseHttpServer httpServer = new BaseHttpServer(8002);
httpServer.AddXmlRPCHandler("login_to_simulator", m_userProfileManager.XmlRpcLoginMethod);
httpServer.AddRestHandler("DELETE", "/usersessions/", m_userProfileManager.RestDeleteUserSessionMethod);
// I guess that this was never used?
//Listener.Prefixes.Add("http://+:8002/userserver/");
httpServer.Start();
}
@ -111,7 +108,7 @@ namespace OpenGridServices.UserServer
switch (what)
{
case "user":
m_console.WriteLine("Creating new user profile");
m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,"Creating new user profile");
string tempfirstname;
string templastname;
string tempMD5Passwd;
@ -143,8 +140,8 @@ namespace OpenGridServices.UserServer
switch (cmd)
{
case "help":
m_console.WriteLine("create user - create a new user");
m_console.WriteLine("shutdown - shutdown the grid (USE CAUTION!)");
m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,"create user - create a new user");
m_console.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,"shutdown - shutdown the grid (USE CAUTION!)");
break;
case "create":

View File

@ -49,7 +49,7 @@ namespace OpenSim.GridInterfaces.Local
{
db.Close();
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.MEDIUM,"Db4 Asset server :Constructor - Exception occured");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(e.ToString());
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, e.ToString());
}
if (!yapfile)
{

View File

@ -26,7 +26,7 @@ namespace OpenSim.GridInterfaces.Remote
this._remoteAssetServerThread = new Thread(new ThreadStart(RunRequests));
this._remoteAssetServerThread.IsBackground = true;
this._remoteAssetServerThread.Start();
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Remote Asset Server class created");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Remote Asset Server class created");
}
public void SetReceiver(IAssetReceiver receiver)
@ -66,7 +66,7 @@ namespace OpenSim.GridInterfaces.Remote
// 404... THE MAGIC FILE NOT FOUND ERROR, very useful for telling you things such as a file (or asset ;) ) not being found!!!!!!!!!!! it's 2:22AM
ARequest req = this._assetRequests.Dequeue();
LLUUID assetID = req.AssetID;
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(" RemoteAssetServer- Got a AssetServer request, processing it - " + this.AssetServerUrl + "assets/" + assetID);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW," RemoteAssetServer- Got a AssetServer request, processing it - " + this.AssetServerUrl + "assets/" + assetID);
WebRequest AssetLoad = WebRequest.Create(this.AssetServerUrl + "assets/" + assetID);
WebResponse AssetResponse = AssetLoad.GetResponse();
byte[] idata = new byte[(int)AssetResponse.ContentLength];

View File

@ -68,7 +68,7 @@ namespace OpenSim.GridInterfaces.Remote
public RemoteGridServer()
{
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Remote Grid Server class created");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Remote Grid Server class created");
}
public override bool RequestConnection(LLUUID SimUUID, string sim_ip, uint sim_port)
@ -88,8 +88,8 @@ namespace OpenSim.GridInterfaces.Remote
if(GridRespData.ContainsKey("error")) {
string errorstring = (string)GridRespData["error"];
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Error connecting to grid:");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(errorstring);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"Error connecting to grid:");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,errorstring);
return false;
}
this.neighbours = (ArrayList)GridRespData["neighbours"];

View File

@ -50,18 +50,18 @@ namespace OpenSim.Storage.LocalStorageDb4o
public void Initialise(string dfile)
{
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Db4LocalStorage Opening " + dfile);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"Db4LocalStorage Opening " + dfile);
datastore = dfile;
try
{
db = Db4oFactory.OpenFile(datastore);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Db4LocalStorage creation");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Db4LocalStorage creation");
}
catch (Exception e)
{
db.Close();
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Db4LocalStorage :Constructor - Exception occured");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(e.ToString());
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"Db4LocalStorage :Constructor - Exception occured");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,e.ToString());
}
}
@ -120,7 +120,7 @@ namespace OpenSim.Storage.LocalStorageDb4o
public void LoadPrimitives(ILocalStorageReceiver receiver)
{
IObjectSet result = db.Get(typeof(PrimData));
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Db4LocalStorage.cs: LoadPrimitives() - number of prims in storages is "+result.Count);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Db4LocalStorage.cs: LoadPrimitives() - number of prims in storages is "+result.Count);
foreach (PrimData prim in result) {
receiver.PrimFromStorage(prim);
}
@ -128,14 +128,14 @@ namespace OpenSim.Storage.LocalStorageDb4o
public float[] LoadWorld()
{
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("LoadWorld() - Loading world....");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"LoadWorld() - Loading world....");
//World blank = new World();
float[] heightmap = null;
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("LoadWorld() - Looking for a heightmap in local DB");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"LoadWorld() - Looking for a heightmap in local DB");
IObjectSet world_result = db.Get(typeof(MapStorage));
if (world_result.Count > 0)
{
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("LoadWorld() - Found a heightmap in local database, loading");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"LoadWorld() - Found a heightmap in local database, loading");
MapStorage map = (MapStorage)world_result.Next();
//blank.LandMap = map.Map;
heightmap = map.Map;
@ -163,7 +163,7 @@ namespace OpenSim.Storage.LocalStorageDb4o
IObjectSet world_result = db.Get(typeof(MapStorage));
if (world_result.Count > 0)
{
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("SaveWorld() - updating saved copy of heightmap in local database");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"SaveWorld() - updating saved copy of heightmap in local database");
MapStorage map = (MapStorage)world_result.Next();
db.Delete(map);
}

View File

@ -54,8 +54,8 @@ namespace OpenSim.Storage.LocalStorageSQLite
catch (Exception e)
{
db.Close();
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("SQLiteLocalStorage :Constructor - Exception occured");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(e.ToString());
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"SQLiteLocalStorage :Constructor - Exception occured");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,e.ToString());
}
}
@ -117,8 +117,8 @@ namespace OpenSim.Storage.LocalStorageSQLite
}
catch (Exception e)
{
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("SQLiteLocalStorage :StorePrim - Exception occured");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(e.ToString());
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"SQLiteLocalStorage :StorePrim - Exception occured");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,e.ToString());
}
cmd.Dispose();
@ -144,8 +144,8 @@ namespace OpenSim.Storage.LocalStorageSQLite
}
catch (Exception e)
{
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("SQLiteLocalStorage :RemovePrim - Exception occured");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(e.ToString());
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"SQLiteLocalStorage :RemovePrim - Exception occured");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,e.ToString());
}
cmd.Dispose();

View File

@ -36,7 +36,7 @@ namespace OpenUser.Config.UserConfigDb4o
{
public UserConfig GetConfigObject()
{
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Loading Db40Config dll");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Loading Db40Config dll");
return ( new DbUserConfig());
}
}
@ -46,7 +46,7 @@ namespace OpenUser.Config.UserConfigDb4o
private IObjectContainer db;
public void LoadDefaults() {
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Config.cs:LoadDefaults() - Please press enter to retain default or enter new settings");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH,"Config.cs:LoadDefaults() - Please press enter to retain default or enter new settings");
this.DefaultStartupMsg = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Default startup message", "Welcome to OGS");
@ -60,7 +60,7 @@ namespace OpenUser.Config.UserConfigDb4o
db = Db4oFactory.OpenFile("openuser.yap");
IObjectSet result = db.Get(typeof(DbUserConfig));
if(result.Count==1) {
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Config.cs:InitConfig() - Found a UserConfig object in the local database, loading");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Config.cs:InitConfig() - Found a UserConfig object in the local database, loading");
foreach (DbUserConfig cfg in result) {
this.GridServerURL=cfg.GridServerURL;
this.GridSendKey=cfg.GridSendKey;
@ -68,22 +68,22 @@ namespace OpenUser.Config.UserConfigDb4o
this.DefaultStartupMsg=cfg.DefaultStartupMsg;
}
} else {
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Config.cs:InitConfig() - Could not find object in database, loading precompiled defaults");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Config.cs:InitConfig() - Could not find object in database, loading precompiled defaults");
LoadDefaults();
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Writing out default settings to local database");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Writing out default settings to local database");
db.Set(this);
db.Close();
}
} catch(Exception e) {
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Config.cs:InitConfig() - Exception occured");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(e.ToString());
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"Config.cs:InitConfig() - Exception occured");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,e.ToString());
}
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("User settings loaded:");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Default startup message: " + this.DefaultStartupMsg);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Grid server URL: " + this.GridServerURL);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Key to send to grid: " + this.GridSendKey);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Key to expect from grid: " + this.GridRecvKey);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"User settings loaded:");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Default startup message: " + this.DefaultStartupMsg);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Grid server URL: " + this.GridServerURL);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Key to send to grid: " + this.GridSendKey);
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Key to expect from grid: " + this.GridRecvKey);
}