aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Util.cs
diff options
context:
space:
mode:
authorMic Bowman2013-02-06 17:32:57 -0800
committerMic Bowman2013-02-06 17:32:57 -0800
commit274d376c82c8cfd6fa8ef5873f77567446c8b64d (patch)
tree06eb4ade64b736762ffbfbd1364fb4942bfbe1e4 /OpenSim/Framework/Util.cs
parentEnables script access to the per object dynamic attributes through the JsonStore (diff)
parentMerge branch 'master' of git://opensimulator.org/git/opensim (diff)
downloadopensim-SC_OLD-274d376c82c8cfd6fa8ef5873f77567446c8b64d.zip
opensim-SC_OLD-274d376c82c8cfd6fa8ef5873f77567446c8b64d.tar.gz
opensim-SC_OLD-274d376c82c8cfd6fa8ef5873f77567446c8b64d.tar.bz2
opensim-SC_OLD-274d376c82c8cfd6fa8ef5873f77567446c8b64d.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Framework/Util.cs')
-rw-r--r--OpenSim/Framework/Util.cs16
1 files changed, 15 insertions, 1 deletions
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;
45using System.Xml; 45using System.Xml;
46using System.Threading; 46using System.Threading;
47using log4net; 47using log4net;
48using log4net.Appender;
48using Nini.Config; 49using Nini.Config;
49using Nwc.XmlRpc; 50using Nwc.XmlRpc;
50using OpenMetaverse; 51using OpenMetaverse;
@@ -816,9 +817,22 @@ namespace OpenSim.Framework
816 return "."; 817 return ".";
817 } 818 }
818 819
820 public static string logFile()
821 {
822 foreach (IAppender appender in LogManager.GetRepository().GetAppenders())
823 {
824 if (appender is FileAppender)
825 {
826 return ((FileAppender)appender).File;
827 }
828 }
829
830 return "./OpenSim.log";
831 }
832
819 public static string logDir() 833 public static string logDir()
820 { 834 {
821 return "."; 835 return Path.GetDirectoryName(logFile());
822 } 836 }
823 837
824 // From: http://coercedcode.blogspot.com/2008/03/c-generate-unique-filenames-within.html 838 // From: http://coercedcode.blogspot.com/2008/03/c-generate-unique-filenames-within.html