From efbb44b98af8b2b4d59c00b90034c10d6966f60f Mon Sep 17 00:00:00 2001 From: Mike Mazur Date: Mon, 16 Feb 2009 02:28:43 +0000 Subject: Standardize logging messages. --- .../Plugins/Simple/SimpleAssetStoragePlugin.cs | 16 ++++++++-------- .../Plugins/Simple/SimpleInventoryStoragePlugin.cs | 20 ++++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) (limited to 'OpenSim/Grid/AssetInventoryServer/Plugins/Simple') diff --git a/OpenSim/Grid/AssetInventoryServer/Plugins/Simple/SimpleAssetStoragePlugin.cs b/OpenSim/Grid/AssetInventoryServer/Plugins/Simple/SimpleAssetStoragePlugin.cs index 384f5f0..26c34e9 100644 --- a/OpenSim/Grid/AssetInventoryServer/Plugins/Simple/SimpleAssetStoragePlugin.cs +++ b/OpenSim/Grid/AssetInventoryServer/Plugins/Simple/SimpleAssetStoragePlugin.cs @@ -83,7 +83,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple } 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; } } @@ -114,7 +114,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple } 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; } @@ -165,7 +165,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple } 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; } @@ -203,7 +203,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple LoadFiles(DEFAULT_DATA_DIR, false); 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); } @@ -212,7 +212,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple /// 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); } @@ -239,7 +239,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple if (Directory.Exists(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); } catch (Exception ex) { - m_log.Warn(ex.Message); + m_log.Warn("[SIMPLEASSETSTORAGE]: " + ex.Message); return; } } @@ -283,7 +283,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple } catch (Exception ex) { - m_log.Warn(ex.Message); + m_log.Warn("[SIMPLEASSETSTORAGE]: " + ex.Message); } } } diff --git a/OpenSim/Grid/AssetInventoryServer/Plugins/Simple/SimpleInventoryStoragePlugin.cs b/OpenSim/Grid/AssetInventoryServer/Plugins/Simple/SimpleInventoryStoragePlugin.cs index e317ae3..fee8837 100644 --- a/OpenSim/Grid/AssetInventoryServer/Plugins/Simple/SimpleInventoryStoragePlugin.cs +++ b/OpenSim/Grid/AssetInventoryServer/Plugins/Simple/SimpleInventoryStoragePlugin.cs @@ -210,7 +210,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple } catch (Exception ex) { - m_log.Error(ex.Message); + m_log.Error("[SIMPLEINVENTORYSTORAGE]: " + ex.Message); ret = BackendResponse.Failure; } } @@ -252,7 +252,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple } catch (Exception ex) { - m_log.Error(ex.Message); + m_log.Error("[SIMPLEINVENTORYSTORAGE]: " + ex.Message); ret = BackendResponse.Failure; } } @@ -306,7 +306,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple } catch (Exception ex) { - m_log.Error(ex.Message); + m_log.Error("[SIMPLEINVENTORYSTORAGE]: " + ex.Message); ret = BackendResponse.Failure; } } @@ -354,7 +354,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple foreach (string match in matches) { 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; @@ -391,7 +391,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple foreach (string match in matches) { 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; @@ -502,7 +502,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple try { Directory.CreateDirectory(folder); } catch (Exception ex) { - m_log.Warn(ex.Message); + m_log.Warn("[SIMPLEINVENTORYSTORAGE]: " + ex.Message); return; } } @@ -526,7 +526,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple } 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) @@ -582,7 +582,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple } 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); - 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); } @@ -603,7 +603,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.Simple /// 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); } -- cgit v1.1