diff options
author | Jeff Ames | 2008-02-05 19:44:27 +0000 |
---|---|---|
committer | Jeff Ames | 2008-02-05 19:44:27 +0000 |
commit | 6ed5283bc06a62f38eb517e67b975832b603bf61 (patch) | |
tree | e5f635018789b73a99ddeca0883a68368fa5eece /OpenSim/Grid/ScriptEngine/DotNetEngine/Common.cs | |
parent | Cut down on the number of packets sent during terraforming. Terraforming shou... (diff) | |
download | opensim-SC-6ed5283bc06a62f38eb517e67b975832b603bf61.zip opensim-SC-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.gz opensim-SC-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.bz2 opensim-SC-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.xz |
Converted logging to use log4net.
Changed LogBase to ConsoleBase, which handles console I/O.
This is mostly an in-place conversion, so lots of refactoring can still be done.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Grid/ScriptEngine/DotNetEngine/Common.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/Common.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/Common.cs index 98a2cc5..bcfeefc 100644 --- a/OpenSim/Grid/ScriptEngine/DotNetEngine/Common.cs +++ b/OpenSim/Grid/ScriptEngine/DotNetEngine/Common.cs | |||
@@ -26,10 +26,13 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | /* Original code: Tedd Hansen */ | 28 | /* Original code: Tedd Hansen */ |
29 | |||
29 | namespace OpenSim.Grid.ScriptEngine.DotNetEngine | 30 | namespace OpenSim.Grid.ScriptEngine.DotNetEngine |
30 | { | 31 | { |
31 | public static class Common | 32 | public static class Common |
32 | { | 33 | { |
34 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
35 | |||
33 | public static bool debug = true; | 36 | public static bool debug = true; |
34 | public static ScriptEngine mySE; | 37 | public static ScriptEngine mySE; |
35 | 38 | ||
@@ -41,14 +44,14 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine | |||
41 | public static void SendToDebug(string Message) | 44 | public static void SendToDebug(string Message) |
42 | { | 45 | { |
43 | //if (Debug == true) | 46 | //if (Debug == true) |
44 | mySE.Log.Verbose("ScriptEngine", "Debug: " + Message); | 47 | mySE.m_log.Info("[ScriptEngine]: Debug: " + Message); |
45 | //SendToDebugEvent("\r\n" + DateTime.Now.ToString("[HH:mm:ss] ") + Message); | 48 | //SendToDebugEvent("\r\n" + DateTime.Now.ToString("[HH:mm:ss] ") + Message); |
46 | } | 49 | } |
47 | 50 | ||
48 | public static void SendToLog(string Message) | 51 | public static void SendToLog(string Message) |
49 | { | 52 | { |
50 | //if (Debug == true) | 53 | //if (Debug == true) |
51 | mySE.Log.Verbose("ScriptEngine", "LOG: " + Message); | 54 | mySE.m_log.Info("[ScriptEngine]: LOG: " + Message); |
52 | //SendToLogEvent("\r\n" + DateTime.Now.ToString("[HH:mm:ss] ") + Message); | 55 | //SendToLogEvent("\r\n" + DateTime.Now.ToString("[HH:mm:ss] ") + Message); |
53 | } | 56 | } |
54 | } | 57 | } |