From 5cef8bf64ec3725788ca0ceb70395f8389e52e7c Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 8 Nov 2013 00:31:26 +0000 Subject: Make admin_save_oar request submit a request ID and log this for tracking. Previous behaviour of always logging 'name' is unhelpful since this actually an error message parameter which is only filled out if an error has occurred --- .../RemoteController/RemoteAdminPlugin.cs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index c78cf3b..8b66ee1 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs @@ -1408,7 +1408,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController /// private void XmlRpcSaveOARMethod(XmlRpcRequest request, XmlRpcResponse response, IPEndPoint remoteClient) { - m_log.Info("[RADMIN]: Received Save OAR Administrator Request"); + m_log.Info("[RADMIN]: Received Save OAR Request"); Hashtable responseData = (Hashtable)response.Value; Hashtable requestData = (Hashtable)request.Params[0]; @@ -1454,8 +1454,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController if (archiver != null) { + Guid requestId = Guid.NewGuid(); scene.EventManager.OnOarFileSaved += RemoteAdminOarSaveCompleted; - archiver.ArchiveRegion(filename, options); + + m_log.InfoFormat( + "[RADMIN]: Submitting save OAR request for {0} to file {1}, request ID {2}", + scene.Name, filename, requestId); + + archiver.ArchiveRegion(filename, requestId, options); lock (m_saveOarLock) Monitor.Wait(m_saveOarLock,5000); @@ -1476,12 +1482,16 @@ namespace OpenSim.ApplicationPlugins.RemoteController throw e; } - m_log.Info("[RADMIN]: Save OAR Administrator Request complete"); + m_log.Info("[RADMIN]: Save OAR Request complete"); } private void RemoteAdminOarSaveCompleted(Guid uuid, string name) { - m_log.DebugFormat("[RADMIN]: File processing complete for {0}", name); + if (name != "") + m_log.ErrorFormat("[RADMIN]: Saving of OAR file with request ID {0} failed with message {1}", uuid, name); + else + m_log.DebugFormat("[RADMIN]: Saved OAR file for request {0}", uuid); + lock (m_saveOarLock) Monitor.Pulse(m_saveOarLock); } -- cgit v1.1