aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim.Framework.Console/ConsoleBase.cs30
1 files changed, 24 insertions, 6 deletions
diff --git a/OpenSim.Framework.Console/ConsoleBase.cs b/OpenSim.Framework.Console/ConsoleBase.cs
index dd8054a..4c92474 100644
--- a/OpenSim.Framework.Console/ConsoleBase.cs
+++ b/OpenSim.Framework.Console/ConsoleBase.cs
@@ -5,6 +5,17 @@ namespace OpenSim.Framework.Console
5{ 5{
6 public class ConsoleBase 6 public class ConsoleBase
7 { 7 {
8 public enum LogPriority : int
9 {
10 CRITICAL,
11 HIGH,
12 MEDIUM,
13 NORMAL,
14 LOW,
15 VERBOSE,
16 EXTRAVERBOSE
17 }
18
8 StreamWriter Log; 19 StreamWriter Log;
9 public conscmd_callback cmdparser; 20 public conscmd_callback cmdparser;
10 public string componentname; 21 public string componentname;
@@ -42,15 +53,11 @@ namespace OpenSim.Framework.Console
42 53
43 public void Write(string format, params object[] args) 54 public void Write(string format, params object[] args)
44 { 55 {
45 Log.Write(format, args); 56 WriteLine(LogPriority.NORMAL,format,args);
46 Log.Flush();
47 if(!disableOutput)
48 {
49 System.Console.Write(format, args);
50 }
51 return; 57 return;
52 } 58 }
53 59
60 [Obsolete("WriteLine(msg,args) has been depreciated, use WriteLine(priority,msg,args) instead.")]
54 public void WriteLine(string format, params object[] args) 61 public void WriteLine(string format, params object[] args)
55 { 62 {
56 Log.WriteLine(format, args); 63 Log.WriteLine(format, args);
@@ -62,6 +69,17 @@ namespace OpenSim.Framework.Console
62 return; 69 return;
63 } 70 }
64 71
72 public void WriteLine(LogPriority importance, string format, params object[] args)
73 {
74 Log.WriteLine(format, args);
75 Log.Flush();
76 if (!disableOutput)
77 {
78 System.Console.WriteLine(format, args);
79 }
80 return;
81 }
82
65 public string ReadLine() 83 public string ReadLine()
66 { 84 {
67 string TempStr = System.Console.ReadLine(); 85 string TempStr = System.Console.ReadLine();