diff options
author | Melanie | 2013-02-07 01:40:11 +0000 |
---|---|---|
committer | Melanie | 2013-02-07 01:40:11 +0000 |
commit | 375114bea37a017af553595d3a6f9d269acac1c5 (patch) | |
tree | 41cdd67221bc0b1af5e6bd886338a0e90d2c856e /OpenSim/Framework/Util.cs | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-375114bea37a017af553595d3a6f9d269acac1c5.zip opensim-SC_OLD-375114bea37a017af553595d3a6f9d269acac1c5.tar.gz opensim-SC_OLD-375114bea37a017af553595d3a6f9d269acac1c5.tar.bz2 opensim-SC_OLD-375114bea37a017af553595d3a6f9d269acac1c5.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
Diffstat (limited to 'OpenSim/Framework/Util.cs')
-rw-r--r-- | OpenSim/Framework/Util.cs | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index e0d4d74..8e325d7 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -45,6 +45,7 @@ using System.Text.RegularExpressions; | |||
45 | using System.Xml; | 45 | using System.Xml; |
46 | using System.Threading; | 46 | using System.Threading; |
47 | using log4net; | 47 | using log4net; |
48 | using log4net.Appender; | ||
48 | using Nini.Config; | 49 | using Nini.Config; |
49 | using Nwc.XmlRpc; | 50 | using Nwc.XmlRpc; |
50 | using OpenMetaverse; | 51 | using OpenMetaverse; |
@@ -828,9 +829,22 @@ namespace OpenSim.Framework | |||
828 | return "."; | 829 | return "."; |
829 | } | 830 | } |
830 | 831 | ||
832 | public static string logFile() | ||
833 | { | ||
834 | foreach (IAppender appender in LogManager.GetRepository().GetAppenders()) | ||
835 | { | ||
836 | if (appender is FileAppender) | ||
837 | { | ||
838 | return ((FileAppender)appender).File; | ||
839 | } | ||
840 | } | ||
841 | |||
842 | return "./OpenSim.log"; | ||
843 | } | ||
844 | |||
831 | public static string logDir() | 845 | public static string logDir() |
832 | { | 846 | { |
833 | return "."; | 847 | return Path.GetDirectoryName(logFile()); |
834 | } | 848 | } |
835 | 849 | ||
836 | // From: http://coercedcode.blogspot.com/2008/03/c-generate-unique-filenames-within.html | 850 | // From: http://coercedcode.blogspot.com/2008/03/c-generate-unique-filenames-within.html |