From 26b8018bccbcb0f6a296adbb11bdc66733aa9e12 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Wed, 17 Oct 2007 10:58:19 +0000 Subject: * Some asset loading refactoring --- OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'OpenSim/Framework/Data.SQLite') diff --git a/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs b/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs index 922d714..0f3625b 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs @@ -101,15 +101,8 @@ namespace OpenSim.Framework.Data.SQLite public void UpdateAsset(AssetBase asset) { - MainLog.Instance.Verbose("AssetStorage", - "Asset: " + asset.FullID + - ", Name: " + asset.Name + - ", Description: " + asset.Description + - ", Type: " + asset.Type + - ", InvType: " + asset.InvType + - ", Temporary: " + asset.Temporary + - ", Local: " + asset.Local + - ", Data Length: " + asset.Data.Length ); + LogAssetLoad(asset); + DataTable assets = ds.Tables["assets"]; lock(ds) { DataRow row = assets.Rows.Find(asset.FullID); @@ -126,6 +119,16 @@ namespace OpenSim.Framework.Data.SQLite } } + private void LogAssetLoad(AssetBase asset) + { + string temporary = asset.Temporary ? "Temporary" : "Stored"; + string local = asset.Local ? "Local" : "Remote"; + + MainLog.Instance.Verbose("ASSETSTORAGE", + string.Format("Loaded {6} {5} Asset: [{0}][{3}/{4}] \"{1}\":{2} ({7} bytes)", + asset.FullID, asset.Name, asset.Description, asset.Type, asset.InvType, temporary, local, asset.Data.Length) ); + } + public bool ExistsAsset(LLUUID uuid) { DataRow row = ds.Tables["assets"].Rows.Find(uuid); -- cgit v1.1