Standardize logging messages.

0.6.3-post-fixes
Mike Mazur 2009-02-16 02:28:43 +00:00
parent ab5e332832
commit efbb44b98a
13 changed files with 92 additions and 92 deletions

View File

@ -55,8 +55,8 @@ namespace OpenSim.Grid.AssetInventoryServer
if (!File.Exists(iniFilePath)) if (!File.Exists(iniFilePath))
{ {
m_log.FatalFormat("[CONFIG] File {0} not found, could not load any configuration.", iniFilePath); m_log.FatalFormat("[CONFIG]: File {0} not found, could not load any configuration.", iniFilePath);
m_log.FatalFormat("[CONFIG] Did you copy the AssetInventoryServer.ini.example file to AssetInventoryServer.ini?"); m_log.FatalFormat("[CONFIG]: Did you copy the AssetInventoryServer.ini.example file to AssetInventoryServer.ini?");
Environment.Exit(1); Environment.Exit(1);
} }

View File

@ -63,7 +63,7 @@ namespace OpenSim.Grid.AssetInventoryServer
public bool Start() public bool Start()
{ {
Startup(); Startup();
m_log.Info("[ASSETINVENTORY] Starting AssetInventory Server"); m_log.Info("[ASSETINVENTORY]: Starting AssetInventory Server");
try try
{ {
@ -71,7 +71,7 @@ namespace OpenSim.Grid.AssetInventoryServer
} }
catch (Exception) catch (Exception)
{ {
m_log.Error("[ASSETINVENTORY] Failed to load the config."); m_log.Error("[ASSETINVENTORY]: Failed to load the config.");
return false; return false;
} }
@ -92,7 +92,7 @@ namespace OpenSim.Grid.AssetInventoryServer
} }
catch (Exception ex) catch (Exception ex)
{ {
m_log.Error("[ASSETINVENTORY] Initializing the HTTP server failed, shutting down: " + ex.Message); m_log.Error("[ASSETINVENTORY]: Initializing the HTTP server failed, shutting down: " + ex.Message);
Shutdown(); Shutdown();
return false; return false;
} }
@ -122,18 +122,18 @@ namespace OpenSim.Grid.AssetInventoryServer
{ {
foreach (IAssetInventoryServerPlugin plugin in m_frontends) foreach (IAssetInventoryServerPlugin plugin in m_frontends)
{ {
m_log.Debug("[ASSETINVENTORY] Disposing plugin " + plugin.Name); m_log.Debug("[ASSETINVENTORY]: Disposing plugin " + plugin.Name);
try { plugin.Dispose(); } try { plugin.Dispose(); }
catch (Exception ex) catch (Exception ex)
{ m_log.ErrorFormat("[ASSETINVENTORY] Failure shutting down plugin {0}: {1}", plugin.Name, ex.Message); } { m_log.ErrorFormat("[ASSETINVENTORY]: Failure shutting down plugin {0}: {1}", plugin.Name, ex.Message); }
} }
foreach (IAssetInventoryServerPlugin plugin in m_backends) foreach (IAssetInventoryServerPlugin plugin in m_backends)
{ {
m_log.Debug("[ASSETINVENTORY] Disposing plugin " + plugin.Name); m_log.Debug("[ASSETINVENTORY]: Disposing plugin " + plugin.Name);
try { plugin.Dispose(); } try { plugin.Dispose(); }
catch (Exception ex) catch (Exception ex)
{ m_log.ErrorFormat("[ASSETINVENTORY] Failure shutting down plugin {0}: {1}", plugin.Name, ex.Message); } { m_log.ErrorFormat("[ASSETINVENTORY]: Failure shutting down plugin {0}: {1}", plugin.Name, ex.Message); }
} }
if (HttpServer != null) if (HttpServer != null)
@ -145,7 +145,7 @@ namespace OpenSim.Grid.AssetInventoryServer
m_httpServer = new BaseHttpServer(port); m_httpServer = new BaseHttpServer(port);
m_httpServer.Start(); m_httpServer.Start();
m_log.Info("[ASSETINVENTORY] AssetInventory server is listening on port " + port); m_log.Info("[ASSETINVENTORY]: AssetInventory server is listening on port " + port);
} }
private IAssetInventoryServerPlugin LoadAssetInventoryServerPlugin(string addinPath, string provider) private IAssetInventoryServerPlugin LoadAssetInventoryServerPlugin(string addinPath, string provider)

View File

@ -50,7 +50,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins
{ {
//m_server = server; //m_server = server;
m_log.Info("[ASSET] Authorize All loaded."); m_log.Info("[AUTHORIZEALL]: Authorize All loaded.");
} }
/// <summary> /// <summary>
@ -58,7 +58,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins
/// </summary> /// </summary>
public void Initialise() public void Initialise()
{ {
m_log.InfoFormat("[ASSET]: {0} cannot be default-initialized!", Name); m_log.InfoFormat("[AUTHORIZEALL]: {0} cannot be default-initialized!", Name);
throw new PluginNotInitialisedException(Name); throw new PluginNotInitialisedException(Name);
} }

View File

@ -59,7 +59,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins
// Request for / or /?... // Request for / or /?...
//m_server.HttpServer.AddStreamHandler(new BrowseRequestHandler(server)); //m_server.HttpServer.AddStreamHandler(new BrowseRequestHandler(server));
m_log.Info("[ASSET] Browser Frontend loaded."); m_log.Info("[BROWSEFRONTEND]: Browser Frontend loaded.");
} }
/// <summary> /// <summary>
@ -67,7 +67,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins
/// </summary> /// </summary>
public void Initialise() public void Initialise()
{ {
m_log.InfoFormat("[ASSET]: {0} cannot be default-initialized!", Name); m_log.InfoFormat("[BROWSEFRONTEND]: {0} cannot be default-initialized!", Name);
throw new PluginNotInitialisedException(Name); throw new PluginNotInitialisedException(Name);
} }

View File

@ -50,7 +50,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins
{ {
//m_server = server; //m_server = server;
m_log.Info("[ASSET] Null Authentication loaded."); m_log.Info("[NULLAUTHENTICATION]: Null Authentication loaded.");
} }
/// <summary> /// <summary>
@ -58,7 +58,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins
/// </summary> /// </summary>
public void Initialise() public void Initialise()
{ {
m_log.InfoFormat("[ASSET]: {0} cannot be default-initialized!", Name); m_log.InfoFormat("[NULLAUTHENTICATION]: {0} cannot be default-initialized!", Name);
throw new PluginNotInitialisedException(Name); throw new PluginNotInitialisedException(Name);
} }

View File

@ -47,72 +47,72 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins
public void LogAssetMetadataFetch(string extension, BackendResponse response, UUID assetID, DateTime time) public void LogAssetMetadataFetch(string extension, BackendResponse response, UUID assetID, DateTime time)
{ {
m_log.DebugFormat("[{0}] AssetMetadataFetch(): AssetID: {1}, Response: {2}", extension, assetID, response); m_log.DebugFormat("[{0}]: AssetMetadataFetch(): AssetID: {1}, Response: {2}", extension, assetID, response);
} }
public void LogAssetDataFetch(string extension, BackendResponse response, UUID assetID, int dataSize, DateTime time) public void LogAssetDataFetch(string extension, BackendResponse response, UUID assetID, int dataSize, DateTime time)
{ {
m_log.DebugFormat("[{0}] AssetDataFetch(): AssetID: {1}, DataSize: {2}, Response: {3}", extension, assetID, m_log.DebugFormat("[{0}]: AssetDataFetch(): AssetID: {1}, DataSize: {2}, Response: {3}", extension, assetID,
dataSize, response); dataSize, response);
} }
public void LogAssetCreate(string extension, BackendResponse response, UUID assetID, int dataSize, DateTime time) public void LogAssetCreate(string extension, BackendResponse response, UUID assetID, int dataSize, DateTime time)
{ {
m_log.DebugFormat("[{0}] AssetCreate(): AssetID: {1}, DataSize: {2}, Response: {3}", extension, assetID, m_log.DebugFormat("[{0}]: AssetCreate(): AssetID: {1}, DataSize: {2}, Response: {3}", extension, assetID,
dataSize, response); dataSize, response);
} }
public void LogInventoryFetch(string extension, BackendResponse response, Uri owner, UUID objID, bool folder, DateTime time) public void LogInventoryFetch(string extension, BackendResponse response, Uri owner, UUID objID, bool folder, DateTime time)
{ {
m_log.DebugFormat("[{0}] InventoryFetch(): ObjID: {1}, Folder: {2}, OwnerID: {3}, Response: {4}", extension, m_log.DebugFormat("[{0}]: InventoryFetch(): ObjID: {1}, Folder: {2}, OwnerID: {3}, Response: {4}", extension,
objID, folder, owner, response); objID, folder, owner, response);
} }
public void LogInventoryFetchFolderContents(string extension, BackendResponse response, Uri owner, UUID folderID, DateTime time) public void LogInventoryFetchFolderContents(string extension, BackendResponse response, Uri owner, UUID folderID, DateTime time)
{ {
m_log.DebugFormat("[{0}] InventoryFetchFolderContents(): FolderID: {1}, OwnerID: {2}, Response: {3}", extension, m_log.DebugFormat("[{0}]: InventoryFetchFolderContents(): FolderID: {1}, OwnerID: {2}, Response: {3}", extension,
folderID, owner, response); folderID, owner, response);
} }
public void LogInventoryFetchFolderList(string extension, BackendResponse response, Uri owner, DateTime time) public void LogInventoryFetchFolderList(string extension, BackendResponse response, Uri owner, DateTime time)
{ {
m_log.DebugFormat("[{0}] InventoryFetchFolderList(): OwnerID: {1}, Response: {2}", extension, m_log.DebugFormat("[{0}]: InventoryFetchFolderList(): OwnerID: {1}, Response: {2}", extension,
owner, response); owner, response);
} }
public void LogInventoryFetchInventory(string extension, BackendResponse response, Uri owner, DateTime time) public void LogInventoryFetchInventory(string extension, BackendResponse response, Uri owner, DateTime time)
{ {
m_log.DebugFormat("[{0}] InventoryFetchInventory(): OwnerID: {1}, Response: {2}", extension, m_log.DebugFormat("[{0}]: InventoryFetchInventory(): OwnerID: {1}, Response: {2}", extension,
owner, response); owner, response);
} }
public void LogInventoryFetchActiveGestures(string extension, BackendResponse response, Uri owner, DateTime time) public void LogInventoryFetchActiveGestures(string extension, BackendResponse response, Uri owner, DateTime time)
{ {
m_log.DebugFormat("[{0}] InventoryFetchActiveGestures(): OwnerID: {1}, Response: {2}", extension, m_log.DebugFormat("[{0}]: InventoryFetchActiveGestures(): OwnerID: {1}, Response: {2}", extension,
owner, response); owner, response);
} }
public void LogInventoryCreate(string extension, BackendResponse response, Uri owner, bool folder, DateTime time) public void LogInventoryCreate(string extension, BackendResponse response, Uri owner, bool folder, DateTime time)
{ {
m_log.DebugFormat("[{0}] InventoryCreate(): OwnerID: {1}, Response: {2}", extension, m_log.DebugFormat("[{0}]: InventoryCreate(): OwnerID: {1}, Response: {2}", extension,
owner, response); owner, response);
} }
public void LogInventoryCreateInventory(string extension, BackendResponse response, DateTime time) public void LogInventoryCreateInventory(string extension, BackendResponse response, DateTime time)
{ {
m_log.DebugFormat("[{0}] InventoryCreateInventory(): Response: {1}", extension, m_log.DebugFormat("[{0}]: InventoryCreateInventory(): Response: {1}", extension,
response); response);
} }
public void LogInventoryDelete(string extension, BackendResponse response, Uri owner, UUID objID, bool folder, DateTime time) public void LogInventoryDelete(string extension, BackendResponse response, Uri owner, UUID objID, bool folder, DateTime time)
{ {
m_log.DebugFormat("[{0}] InventoryDelete(): OwnerID: {1}, Folder: {2}, Response: {3}", extension, m_log.DebugFormat("[{0}]: InventoryDelete(): OwnerID: {1}, Folder: {2}, Response: {3}", extension,
owner, folder, response); owner, folder, response);
} }
public void LogInventoryPurgeFolder(string extension, BackendResponse response, Uri owner, UUID folderID, DateTime time) public void LogInventoryPurgeFolder(string extension, BackendResponse response, Uri owner, UUID folderID, DateTime time)
{ {
m_log.DebugFormat("[{0}] InventoryPurgeFolder(): OwnerID: {1}, FolderID: {2}, Response: {3}", extension, m_log.DebugFormat("[{0}]: InventoryPurgeFolder(): OwnerID: {1}, FolderID: {2}, Response: {3}", extension,
owner, response); owner, response);
} }
@ -130,7 +130,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins
/// </summary> /// </summary>
public void Initialise() public void Initialise()
{ {
m_log.Info("[ASSET] Null metrics loaded."); m_log.Info("[NULLMETRICS]: Null metrics loaded.");
} }
public void Dispose() public void Dispose()

View File

@ -62,7 +62,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
// Asset creation // Asset creation
m_server.HttpServer.AddStreamHandler(new AssetPostHandler(server)); m_server.HttpServer.AddStreamHandler(new AssetPostHandler(server));
m_log.Info("[ASSET] OpenSim Asset Frontend loaded."); m_log.Info("[OPENSIMASSETFRONTEND]: OpenSim Asset Frontend loaded.");
} }
/// <summary> /// <summary>
@ -70,7 +70,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
/// </summary> /// </summary>
public void Initialise() public void Initialise()
{ {
m_log.InfoFormat("[ASSET]: {0} cannot be default-initialized!", Name); m_log.InfoFormat("[OPENSIMASSETFRONTEND]: {0} cannot be default-initialized!", Name);
throw new PluginNotInitialisedException(Name); throw new PluginNotInitialisedException(Name);
} }
@ -128,13 +128,13 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
} }
else else
{ {
m_log.WarnFormat("Failed to fetch asset data or metadata for {0}: {1}", assetID, dataResponse); m_log.WarnFormat("[OPENSIMASSETFRONTEND]: Failed to fetch asset data or metadata for {0}: {1}", assetID, dataResponse);
httpResponse.StatusCode = (int) HttpStatusCode.NotFound; httpResponse.StatusCode = (int) HttpStatusCode.NotFound;
} }
} }
else else
{ {
m_log.Warn("Unrecognized OpenSim asset request: " + httpRequest.Url.PathAndQuery); m_log.Warn("[OPENSIMASSETFRONTEND]: Unrecognized OpenSim asset request: " + httpRequest.Url.PathAndQuery);
} }
return buffer; return buffer;
@ -161,7 +161,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
} }
catch (Exception ex) catch (Exception ex)
{ {
m_log.Warn("Failed to parse POST data (expecting AssetBase): " + ex.Message); m_log.Warn("[OPENSIMASSETFRONTEND]: Failed to parse POST data (expecting AssetBase): " + ex.Message);
httpResponse.StatusCode = (int) HttpStatusCode.BadRequest; httpResponse.StatusCode = (int) HttpStatusCode.BadRequest;
} }
@ -178,7 +178,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
} }
else else
{ {
m_log.Warn("AssetPostHandler called with no asset data"); m_log.Warn("[OPENSIMASSETFRONTEND]: AssetPostHandler called with no asset data");
httpResponse.StatusCode = (int) HttpStatusCode.BadRequest; httpResponse.StatusCode = (int) HttpStatusCode.BadRequest;
} }

View File

@ -134,7 +134,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
// } // }
// catch (MySqlException ex) // catch (MySqlException ex)
// { // {
// m_log.Error("Connection to MySQL backend failed: " + ex.Message); // m_log.Error("[OPENSIMASSETSTORAGE]: Connection to MySQL backend failed: " + ex.Message);
// return 0; // return 0;
// } // }
@ -174,15 +174,15 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
m_openSimConfig.GetString("asset_database_connect")); m_openSimConfig.GetString("asset_database_connect"));
if (m_assetProvider == null) if (m_assetProvider == null)
{ {
m_log.Error("[ASSET]: Failed to load a database plugin, server halting."); m_log.Error("[OPENSIMASSETSTORAGE]: Failed to load a database plugin, server halting.");
Environment.Exit(-1); Environment.Exit(-1);
} }
else else
m_log.InfoFormat("[ASSET]: Loaded storage backend: {0}", Version); m_log.InfoFormat("[OPENSIMASSETSTORAGE]: Loaded storage backend: {0}", Version);
} }
catch (Exception e) catch (Exception e)
{ {
m_log.WarnFormat("[ASSET]: Failure loading data plugin: {0}", e.ToString()); m_log.WarnFormat("[OPENSIMASSETSTORAGE]: Failure loading data plugin: {0}", e.ToString());
} }
} }
@ -191,7 +191,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
/// </summary> /// </summary>
public void Initialise() public void Initialise()
{ {
m_log.InfoFormat("[ASSET]: {0} cannot be default-initialized!", Name); m_log.InfoFormat("[OPENSIMASSETSTORAGE]: {0} cannot be default-initialized!", Name);
throw new PluginNotInitialisedException(Name); throw new PluginNotInitialisedException(Name);
} }

View File

@ -67,7 +67,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
//m_server.HttpServer.AddHandler("post", null, @"^/RootFolders/", RootFoldersHandler); //m_server.HttpServer.AddHandler("post", null, @"^/RootFolders/", RootFoldersHandler);
//m_server.HttpServer.AddHandler("post", null, @"^/ActiveGestures/", ActiveGesturesHandler); //m_server.HttpServer.AddHandler("post", null, @"^/ActiveGestures/", ActiveGesturesHandler);
m_log.Info("[INVENTORY] OpenSim Inventory Frontend loaded."); m_log.Info("[OPENSIMINVENTORYFRONTEND]: OpenSim Inventory Frontend loaded.");
} }
/// <summary> /// <summary>
@ -75,7 +75,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
/// </summary> /// </summary>
public void Initialise() public void Initialise()
{ {
m_log.InfoFormat("[INVENTORY]: {0} cannot be default-initialized!", Name); m_log.InfoFormat("[OPENSIMINVENTORYFRONTEND]: {0} cannot be default-initialized!", Name);
throw new PluginNotInitialisedException(Name); throw new PluginNotInitialisedException(Name);
} }
@ -103,7 +103,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
// if (ownerID != UUID.Zero) // if (ownerID != UUID.Zero)
// { // {
// m_log.Warn("GetInventory is not scalable on some inventory backends, avoid calling it wherever possible"); // m_log.Warn("[OPENSIMINVENTORYFRONTEND]: GetInventory is not scalable on some inventory backends, avoid calling it wherever possible");
// Uri owner = Utils.GetOpenSimUri(ownerID); // Uri owner = Utils.GetOpenSimUri(ownerID);
// InventoryCollection inventory; // InventoryCollection inventory;
@ -144,7 +144,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
// if (ownerID != UUID.Zero) // if (ownerID != UUID.Zero)
// { // {
// Uri owner = Utils.GetOpenSimUri(ownerID); // Uri owner = Utils.GetOpenSimUri(ownerID);
// m_log.DebugFormat("Created URI {0} for inventory creation", owner); // m_log.DebugFormat("[OPENSIMINVENTORYFRONTEND]: Created URI {0} for inventory creation", owner);
// InventoryFolder rootFolder = new InventoryFolder("My Inventory", ownerID, UUID.Zero, (short)AssetType.Folder); // InventoryFolder rootFolder = new InventoryFolder("My Inventory", ownerID, UUID.Zero, (short)AssetType.Folder);
// BackendResponse storageResponse = m_server.InventoryProvider.TryCreateInventory(owner, rootFolder); // BackendResponse storageResponse = m_server.InventoryProvider.TryCreateInventory(owner, rootFolder);
@ -365,7 +365,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
// } // }
// catch (Exception ex) // catch (Exception ex)
// { // {
// m_log.Warn("Failed to parse POST data (expecting guid): " + ex.Message); // m_log.Warn("[OPENSIMINVENTORYFRONTEND]: Failed to parse POST data (expecting guid): " + ex.Message);
// } // }
// return id; // return id;
@ -389,7 +389,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
// } // }
// catch (Exception ex) // catch (Exception ex)
// { // {
// m_log.Warn("Failed to parse GetInventory POST data: " + ex.Message); // m_log.Warn("[OPENSIMINVENTORYFRONTEND]: Failed to parse GetInventory POST data: " + ex.Message);
// agentID = UUID.Zero; // agentID = UUID.Zero;
// sessionID = UUID.Zero; // sessionID = UUID.Zero;
// return UUID.Zero; // return UUID.Zero;
@ -426,7 +426,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
// } // }
// catch (Exception ex) // catch (Exception ex)
// { // {
// m_log.Warn("Failed to parse POST data (expecting InventoryFolderBase): " + ex.Message); // m_log.Warn("[OPENSIMINVENTORYFRONTEND]: Failed to parse POST data (expecting InventoryFolderBase): " + ex.Message);
// agentID = UUID.Zero; // agentID = UUID.Zero;
// sessionID = UUID.Zero; // sessionID = UUID.Zero;
// return null; // return null;
@ -474,7 +474,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
// } // }
// catch (Exception ex) // catch (Exception ex)
// { // {
// m_log.Warn("Failed to parse POST data (expecting InventoryItemBase): " + ex.Message); // m_log.Warn("[OPENSIMINVENTORYFRONTEND]: Failed to parse POST data (expecting InventoryItemBase): " + ex.Message);
// agentID = UUID.Zero; // agentID = UUID.Zero;
// sessionID = UUID.Zero; // sessionID = UUID.Zero;
// return null; // return null;

View File

@ -107,7 +107,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
// } // }
// catch (MySqlException ex) // catch (MySqlException ex)
// { // {
// m_log.Error("Connection to MySQL backend failed: " + ex.Message); // m_log.Error("[OPENSIMINVENTORYSTORAGE]: Connection to MySQL backend failed: " + ex.Message);
// ret = BackendResponse.Failure; // ret = BackendResponse.Failure;
// } // }
//} //}
@ -155,7 +155,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
// } // }
// catch (MySqlException ex) // catch (MySqlException ex)
// { // {
// m_log.Error("Connection to MySQL backend failed: " + ex.Message); // m_log.Error("[OPENSIMINVENTORYSTORAGE]: Connection to MySQL backend failed: " + ex.Message);
// ret = BackendResponse.Failure; // ret = BackendResponse.Failure;
// } // }
//} //}
@ -253,7 +253,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
// } // }
// catch (MySqlException ex) // catch (MySqlException ex)
// { // {
// m_log.Error("Connection to MySQL backend failed: " + ex.Message); // m_log.Error("[OPENSIMINVENTORYSTORAGE]: Connection to MySQL backend failed: " + ex.Message);
// ret = BackendResponse.Failure; // ret = BackendResponse.Failure;
// } // }
//} //}
@ -303,7 +303,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
// } // }
// catch (MySqlException ex) // catch (MySqlException ex)
// { // {
// m_log.Error("Connection to MySQL backend failed: " + ex.Message); // m_log.Error("[OPENSIMINVENTORYSTORAGE]: Connection to MySQL backend failed: " + ex.Message);
// ret = BackendResponse.Failure; // ret = BackendResponse.Failure;
// } // }
// } // }
@ -387,7 +387,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
// } // }
// catch (MySqlException ex) // catch (MySqlException ex)
// { // {
// m_log.Error("Connection to MySQL backend failed: " + ex.Message); // m_log.Error("[OPENSIMINVENTORYSTORAGE]: Connection to MySQL backend failed: " + ex.Message);
// ret = BackendResponse.Failure; // ret = BackendResponse.Failure;
// } // }
// } // }
@ -458,7 +458,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
// } // }
// catch (MySqlException ex) // catch (MySqlException ex)
// { // {
// m_log.Error("Connection to MySQL backend failed: " + ex.Message); // m_log.Error("[OPENSIMINVENTORYSTORAGE]: Connection to MySQL backend failed: " + ex.Message);
// ret = BackendResponse.Failure; // ret = BackendResponse.Failure;
// } // }
// } // }
@ -520,18 +520,18 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
// } // }
// else if (rowsAffected == 2) // else if (rowsAffected == 2)
// { // {
// m_log.Info("Replaced inventory item " + item.ID.ToString()); // m_log.Info("[OPENSIMINVENTORYSTORAGE]: Replaced inventory item " + item.ID.ToString());
// ret = BackendResponse.Success; // ret = BackendResponse.Success;
// } // }
// else // else
// { // {
// m_log.ErrorFormat("MySQL REPLACE query affected {0} rows", rowsAffected); // m_log.ErrorFormat("[OPENSIMINVENTORYSTORAGE]: MySQL REPLACE query affected {0} rows", rowsAffected);
// ret = BackendResponse.Failure; // ret = BackendResponse.Failure;
// } // }
// } // }
// catch (MySqlException ex) // catch (MySqlException ex)
// { // {
// m_log.Error("Connection to MySQL backend failed: " + ex.Message); // m_log.Error("[OPENSIMINVENTORYSTORAGE]: Connection to MySQL backend failed: " + ex.Message);
// ret = BackendResponse.Failure; // ret = BackendResponse.Failure;
// } // }
//} //}
@ -569,18 +569,18 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
// } // }
// else if (rowsAffected == 2) // else if (rowsAffected == 2)
// { // {
// m_log.Info("Replaced inventory folder " + folder.ID.ToString()); // m_log.Info("[OPENSIMINVENTORYSTORAGE]: Replaced inventory folder " + folder.ID.ToString());
// ret = BackendResponse.Success; // ret = BackendResponse.Success;
// } // }
// else // else
// { // {
// m_log.ErrorFormat("MySQL REPLACE query affected {0} rows", rowsAffected); // m_log.ErrorFormat("[OPENSIMINVENTORYSTORAGE]: MySQL REPLACE query affected {0} rows", rowsAffected);
// ret = BackendResponse.Failure; // ret = BackendResponse.Failure;
// } // }
// } // }
// catch (MySqlException ex) // catch (MySqlException ex)
// { // {
// m_log.Error("Connection to MySQL backend failed: " + ex.Message); // m_log.Error("[OPENSIMINVENTORYSTORAGE]: Connection to MySQL backend failed: " + ex.Message);
// ret = BackendResponse.Failure; // ret = BackendResponse.Failure;
// } // }
//} //}
@ -621,13 +621,13 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
// } // }
// else // else
// { // {
// m_log.ErrorFormat("MySQL DELETE query affected {0} rows", rowsAffected); // m_log.ErrorFormat("[OPENSIMINVENTORYSTORAGE]: MySQL DELETE query affected {0} rows", rowsAffected);
// ret = BackendResponse.NotFound; // ret = BackendResponse.NotFound;
// } // }
// } // }
// catch (MySqlException ex) // catch (MySqlException ex)
// { // {
// m_log.Error("Connection to MySQL backend failed: " + ex.Message); // m_log.Error("[OPENSIMINVENTORYSTORAGE]: Connection to MySQL backend failed: " + ex.Message);
// ret = BackendResponse.Failure; // ret = BackendResponse.Failure;
// } // }
// } // }
@ -668,13 +668,13 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
// } // }
// else // else
// { // {
// m_log.ErrorFormat("MySQL DELETE query affected {0} rows", rowsAffected); // m_log.ErrorFormat("[OPENSIMINVENTORYSTORAGE]: MySQL DELETE query affected {0} rows", rowsAffected);
// ret = BackendResponse.NotFound; // ret = BackendResponse.NotFound;
// } // }
// } // }
// catch (MySqlException ex) // catch (MySqlException ex)
// { // {
// m_log.Error("Connection to MySQL backend failed: " + ex.Message); // m_log.Error("[OPENSIMINVENTORYSTORAGE]: Connection to MySQL backend failed: " + ex.Message);
// ret = BackendResponse.Failure; // ret = BackendResponse.Failure;
// } // }
// } // }
@ -726,13 +726,13 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
// #endregion Delete folders // #endregion Delete folders
// m_log.DebugFormat("Deleted {0} inventory objects from MySQL in a folder purge", rowsAffected); // m_log.DebugFormat("[OPENSIMINVENTORYSTORAGE]: Deleted {0} inventory objects from MySQL in a folder purge", rowsAffected);
// ret = BackendResponse.Success; // ret = BackendResponse.Success;
// } // }
// catch (MySqlException ex) // catch (MySqlException ex)
// { // {
// m_log.Error("Connection to MySQL backend failed: " + ex.Message); // m_log.Error("[OPENSIMINVENTORYSTORAGE]: Connection to MySQL backend failed: " + ex.Message);
// ret = BackendResponse.Failure; // ret = BackendResponse.Failure;
// } // }
// } // }
@ -766,7 +766,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
// } // }
// catch (MySqlException ex) // catch (MySqlException ex)
// { // {
// m_log.Error("Connection to MySQL backend failed: " + ex.Message); // m_log.Error("[OPENSIMINVENTORYSTORAGE]: Connection to MySQL backend failed: " + ex.Message);
// return 0; // return 0;
// } // }
@ -806,15 +806,15 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
m_openSimConfig.GetString("inventory_database_connect")); m_openSimConfig.GetString("inventory_database_connect"));
if (m_inventoryProvider == null) if (m_inventoryProvider == null)
{ {
m_log.Error("[INVENTORY]: Failed to load a database plugin, server halting."); m_log.Error("[OPENSIMINVENTORYSTORAGE]: Failed to load a database plugin, server halting.");
Environment.Exit(-1); Environment.Exit(-1);
} }
else else
m_log.InfoFormat("[INVENTORY]: Loaded storage backend: {0}", Version); m_log.InfoFormat("[OPENSIMINVENTORYSTORAGE]: Loaded storage backend: {0}", Version);
} }
catch (Exception e) catch (Exception e)
{ {
m_log.WarnFormat("[INVENTORY]: Failure loading data plugin: {0}", e.ToString()); m_log.WarnFormat("[OPENSIMINVENTORYSTORAGE]: Failure loading data plugin: {0}", e.ToString());
} }
} }
@ -824,7 +824,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
public void Initialise() public void Initialise()
{ {
m_log.InfoFormat("[INVENTORY]: {0} cannot be default-initialized!", Name); m_log.InfoFormat("[OPENSIMINVENTORYSTORAGE]: {0} cannot be default-initialized!", Name);
throw new PluginNotInitialisedException(Name); throw new PluginNotInitialisedException(Name);
} }

View File

@ -63,7 +63,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins
// Asset creation // Asset creation
//m_server.HttpServer.AddStreamHandler(new CreateRequestHandler(server)); //m_server.HttpServer.AddStreamHandler(new CreateRequestHandler(server));
m_log.Info("[ASSET] Reference Frontend loaded."); m_log.Info("[REFERENCEFRONTEND]: Reference Frontend loaded.");
} }
/// <summary> /// <summary>
@ -71,7 +71,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins
/// </summary> /// </summary>
public void Initialise() public void Initialise()
{ {
m_log.InfoFormat("[ASSET]: {0} cannot be default-initialized!", Name); m_log.InfoFormat("[REFERENCEFRONTEND]: {0} cannot be default-initialized!", Name);
throw new PluginNotInitialisedException(Name); throw new PluginNotInitialisedException(Name);
} }
@ -159,7 +159,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins
// } // }
// else if (storageResponse == BackendResponse.NotFound) // else if (storageResponse == BackendResponse.NotFound)
// { // {
// m_log.Warn("Could not find metadata for asset " + assetID.ToString()); // m_log.Warn("[REFERENCEFRONTEND]: Could not find metadata for asset " + assetID.ToString());
// httpResponse.StatusCode = (int) HttpStatusCode.NotFound; // httpResponse.StatusCode = (int) HttpStatusCode.NotFound;
// } // }
// else // else

View File

@ -83,7 +83,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple
} }
catch (Exception ex) catch (Exception ex)
{ {
m_log.ErrorFormat("Failed reading data for asset {0} from {1}: {2}", assetID, filename, ex.Message); m_log.ErrorFormat("[SIMPLEASSETSTORAGE]: Failed reading data for asset {0} from {1}: {2}", assetID, filename, ex.Message);
ret = BackendResponse.Failure; ret = BackendResponse.Failure;
} }
} }
@ -114,7 +114,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple
} }
catch (Exception ex) catch (Exception ex)
{ {
m_log.ErrorFormat("Failed reading data for asset {0} from {1}: {2}", assetID, filename, ex.Message); m_log.ErrorFormat("[SIMPLEASSETSTORAGE]: Failed reading data for asset {0} from {1}: {2}", assetID, filename, ex.Message);
ret = BackendResponse.Failure; ret = BackendResponse.Failure;
} }
@ -165,7 +165,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple
} }
catch (Exception ex) catch (Exception ex)
{ {
m_log.ErrorFormat("Failed writing data for asset {0} to {1}: {2}", asset.FullID, filename, ex.Message); m_log.ErrorFormat("[SIMPLEASSETSTORAGE]: Failed writing data for asset {0} to {1}: {2}", asset.FullID, filename, ex.Message);
ret = BackendResponse.Failure; ret = BackendResponse.Failure;
} }
@ -203,7 +203,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple
LoadFiles(DEFAULT_DATA_DIR, false); LoadFiles(DEFAULT_DATA_DIR, false);
LoadFiles(TEMP_DATA_DIR, true); LoadFiles(TEMP_DATA_DIR, true);
m_log.InfoFormat("Initialized the store index with metadata for {0} assets", m_log.InfoFormat("[SIMPLEASSETSTORAGE]: Initialized the store index with metadata for {0} assets",
metadataStorage.Count); metadataStorage.Count);
} }
@ -212,7 +212,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple
/// </summary> /// </summary>
public void Initialise() public void Initialise()
{ {
m_log.InfoFormat("[ASSET]: {0} cannot be default-initialized!", Name); m_log.InfoFormat("[SIMPLEASSETSTORAGE]: {0} cannot be default-initialized!", Name);
throw new PluginNotInitialisedException(Name); throw new PluginNotInitialisedException(Name);
} }
@ -239,7 +239,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple
if (Directory.Exists(TEMP_DATA_DIR)) if (Directory.Exists(TEMP_DATA_DIR))
{ {
try { Directory.Delete(TEMP_DATA_DIR); } try { Directory.Delete(TEMP_DATA_DIR); }
catch (Exception ex) { m_log.Error(ex.Message); } catch (Exception ex) { m_log.Error("[SIMPLEASSETSTORAGE]: " + ex.Message); }
} }
} }
@ -251,7 +251,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple
try { Directory.CreateDirectory(folder); } try { Directory.CreateDirectory(folder); }
catch (Exception ex) catch (Exception ex)
{ {
m_log.Warn(ex.Message); m_log.Warn("[SIMPLEASSETSTORAGE]: " + ex.Message);
return; return;
} }
} }
@ -283,7 +283,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple
} }
catch (Exception ex) catch (Exception ex)
{ {
m_log.Warn(ex.Message); m_log.Warn("[SIMPLEASSETSTORAGE]: " + ex.Message);
} }
} }
} }

View File

@ -210,7 +210,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple
} }
catch (Exception ex) catch (Exception ex)
{ {
m_log.Error(ex.Message); m_log.Error("[SIMPLEINVENTORYSTORAGE]: " + ex.Message);
ret = BackendResponse.Failure; ret = BackendResponse.Failure;
} }
} }
@ -252,7 +252,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple
} }
catch (Exception ex) catch (Exception ex)
{ {
m_log.Error(ex.Message); m_log.Error("[SIMPLEINVENTORYSTORAGE]: " + ex.Message);
ret = BackendResponse.Failure; ret = BackendResponse.Failure;
} }
} }
@ -306,7 +306,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple
} }
catch (Exception ex) catch (Exception ex)
{ {
m_log.Error(ex.Message); m_log.Error("[SIMPLEINVENTORYSTORAGE]: " + ex.Message);
ret = BackendResponse.Failure; ret = BackendResponse.Failure;
} }
} }
@ -354,7 +354,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple
foreach (string match in matches) foreach (string match in matches)
{ {
try { File.Delete(match); } try { File.Delete(match); }
catch (Exception ex) { m_log.ErrorFormat("Failed to delete file {0}: {1}", match, ex.Message); } catch (Exception ex) { m_log.ErrorFormat("[SIMPLEINVENTORYSTORAGE]: Failed to delete file {0}: {1}", match, ex.Message); }
} }
ret = BackendResponse.Success; ret = BackendResponse.Success;
@ -391,7 +391,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple
foreach (string match in matches) foreach (string match in matches)
{ {
try { File.Delete(match); } try { File.Delete(match); }
catch (Exception ex) { m_log.ErrorFormat("Failed to delete folder file {0}: {1}", match, ex.Message); } catch (Exception ex) { m_log.ErrorFormat("[SIMPLEINVENTORYSTORAGE]: Failed to delete folder file {0}: {1}", match, ex.Message); }
} }
ret = BackendResponse.Success; ret = BackendResponse.Success;
@ -502,7 +502,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple
try { Directory.CreateDirectory(folder); } try { Directory.CreateDirectory(folder); }
catch (Exception ex) catch (Exception ex)
{ {
m_log.Warn(ex.Message); m_log.Warn("[SIMPLEINVENTORYSTORAGE]: " + ex.Message);
return; return;
} }
} }
@ -526,7 +526,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple
} }
catch (Exception ex) catch (Exception ex)
{ {
m_log.WarnFormat("Failed loading the index file {0}: {1}", indexPath, ex.Message); m_log.WarnFormat("[SIMPLEINVENTORYSTORAGE]: Failed loading the index file {0}: {1}", indexPath, ex.Message);
} }
if (ownerID != UUID.Zero && owner != null) if (ownerID != UUID.Zero && owner != null)
@ -582,7 +582,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple
} }
catch (Exception ex) catch (Exception ex)
{ {
m_log.ErrorFormat("Failed loading inventory from {0}: {1}", folder, ex.Message); m_log.ErrorFormat("[SIMPLEINVENTORYSTORAGE]: Failed loading inventory from {0}: {1}", folder, ex.Message);
} }
} }
@ -594,7 +594,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple
LoadFiles(DEFAULT_INVENTORY_DIR); LoadFiles(DEFAULT_INVENTORY_DIR);
m_log.InfoFormat("Initialized the inventory index with data for {0} avatars", m_log.InfoFormat("[SIMPLEINVENTORYSTORAGE]: Initialized the inventory index with data for {0} avatars",
inventories.Count); inventories.Count);
} }
@ -603,7 +603,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple
/// </summary> /// </summary>
public void Initialise() public void Initialise()
{ {
m_log.InfoFormat("[ASSET]: {0} cannot be default-initialized!", Name); m_log.InfoFormat("[SIMPLEINVENTORYSTORAGE]: {0} cannot be default-initialized!", Name);
throw new PluginNotInitialisedException(Name); throw new PluginNotInitialisedException(Name);
} }