From df37738ce7702774c4d3ff1f3835bfe87e0f1a5e Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Wed, 6 Feb 2013 16:42:55 -0800 Subject: WebStats will now use actual logfile as specified in OpenSim.exe.config rather than hardcoded ./OpenSim.log. This allows for rotating logs and other file appender types --- OpenSim/Framework/Util.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 9b1e97d..d9148fb 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs @@ -45,6 +45,7 @@ using System.Text.RegularExpressions; using System.Xml; using System.Threading; using log4net; +using log4net.Appender; using Nini.Config; using Nwc.XmlRpc; using OpenMetaverse; @@ -816,9 +817,22 @@ namespace OpenSim.Framework return "."; } + public static string logFile() + { + foreach (IAppender appender in LogManager.GetRepository().GetAppenders()) + { + if (appender is FileAppender) + { + return ((FileAppender)appender).File; + } + } + + return "./OpenSim.log"; + } + public static string logDir() { - return "."; + return Path.GetDirectoryName(logFile()); } // From: http://coercedcode.blogspot.com/2008/03/c-generate-unique-filenames-within.html -- cgit v1.1 From e17392acbb46e1e48e169069a822f8b814762214 Mon Sep 17 00:00:00 2001 From: Mic Bowman Date: Wed, 6 Feb 2013 17:29:17 -0800 Subject: Enables script access to the per object dynamic attributes through the JsonStore script functions. Adds JsonAttachObjectStore to associate a store identifier with an object (scripts can only access the store in their host object, this could be extended but isn't necessary for now). Note this opens a method to the DAMap OSDMap. This will be removed later, but greatly simplifies the code for now. The JsonStore and these scripts are disabled by default. --- OpenSim/Framework/DAMap.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/DAMap.cs b/OpenSim/Framework/DAMap.cs index 291c8b8..7d7738a 100644 --- a/OpenSim/Framework/DAMap.cs +++ b/OpenSim/Framework/DAMap.cs @@ -73,6 +73,14 @@ namespace OpenSim.Framework m_map = (OSDMap)OSDParser.DeserializeLLSDXml(rawXml); } + // WARNING: this is temporary for experimentation only, it will be removed!!!! + public OSDMap TopLevelMap + { + get { return m_map; } + set { m_map = value; } + } + + public void ReadXml(XmlReader reader) { ReadXml(reader.ReadInnerXml()); -- cgit v1.1