aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMW2007-06-08 17:03:49 +0000
committerMW2007-06-08 17:03:49 +0000
commit61cc2650887e0346f4da305925d27277318bf8a6 (patch)
treed5be0ee898fa9e08508067102e4bd213e34694b0
parentRe-imported OpenGridServices from trunk (diff)
downloadopensim-SC-61cc2650887e0346f4da305925d27277318bf8a6.zip
opensim-SC-61cc2650887e0346f4da305925d27277318bf8a6.tar.gz
opensim-SC-61cc2650887e0346f4da305925d27277318bf8a6.tar.bz2
opensim-SC-61cc2650887e0346f4da305925d27277318bf8a6.tar.xz
Updated OpenSim.Framework.Console with changes from trunk (also for now have kept the writeline functions).
-rw-r--r--Common/OpenSim.Framework.Console/AssemblyInfo.cs27
-rw-r--r--Common/OpenSim.Framework.Console/ConsoleBase.cs78
-rw-r--r--Common/OpenSim.Framework.Console/ConsoleCallbacksBase.cs27
-rw-r--r--Common/OpenSim.Framework.Console/MainConsole.cs9
4 files changed, 133 insertions, 8 deletions
diff --git a/Common/OpenSim.Framework.Console/AssemblyInfo.cs b/Common/OpenSim.Framework.Console/AssemblyInfo.cs
index 00a9b7d..8f715d2 100644
--- a/Common/OpenSim.Framework.Console/AssemblyInfo.cs
+++ b/Common/OpenSim.Framework.Console/AssemblyInfo.cs
@@ -1,3 +1,30 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
1using System.Reflection; 28using System.Reflection;
2using System.Runtime.CompilerServices; 29using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 30using System.Runtime.InteropServices;
diff --git a/Common/OpenSim.Framework.Console/ConsoleBase.cs b/Common/OpenSim.Framework.Console/ConsoleBase.cs
index 6a1c53c..0377998 100644
--- a/Common/OpenSim.Framework.Console/ConsoleBase.cs
+++ b/Common/OpenSim.Framework.Console/ConsoleBase.cs
@@ -1,3 +1,30 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
1using System; 28using System;
2using System.IO; 29using System.IO;
3 30
@@ -41,7 +68,7 @@ namespace OpenSim.Framework.Console
41 68
42 public void Write(string format, params object[] args) 69 public void Write(string format, params object[] args)
43 { 70 {
44 WriteLine(LogPriority.NORMAL,format,args); 71 Notice(format,args);
45 return; 72 return;
46 } 73 }
47 74
@@ -50,9 +77,9 @@ namespace OpenSim.Framework.Console
50 { 77 {
51 Log.WriteLine(format, args); 78 Log.WriteLine(format, args);
52 Log.Flush(); 79 Log.Flush();
53 if(!m_silent) 80 if (!m_silent)
54 { 81 {
55 System.Console.WriteLine(format, args); 82 System.Console.WriteLine(format, args);
56 } 83 }
57 return; 84 return;
58 } 85 }
@@ -68,6 +95,49 @@ namespace OpenSim.Framework.Console
68 return; 95 return;
69 } 96 }
70 97
98 public void Warn(string format, params object[] args)
99 {
100 WriteNewLine(ConsoleColor.Yellow, format, args);
101 return;
102 }
103
104 public void Notice(string format, params object[] args)
105 {
106 WriteNewLine(ConsoleColor.White, format, args);
107 return;
108 }
109
110 public void Error(string format, params object[] args)
111 {
112 WriteNewLine(ConsoleColor.Red, format, args);
113 return;
114 }
115
116 public void Verbose(string format, params object[] args)
117 {
118 WriteNewLine(ConsoleColor.Gray, format, args);
119 return;
120 }
121
122 public void Status(string format, params object[] args)
123 {
124 WriteNewLine(ConsoleColor.Blue, format, args);
125 return;
126 }
127
128 private void WriteNewLine(System.ConsoleColor color, string format, params object[] args)
129 {
130 Log.WriteLine(format, args);
131 Log.Flush();
132 if (!m_silent)
133 {
134 System.Console.ForegroundColor = color;
135 System.Console.WriteLine(format, args);
136 System.Console.ResetColor();
137 }
138 return;
139 }
140
71 public string ReadLine() 141 public string ReadLine()
72 { 142 {
73 string TempStr = System.Console.ReadLine(); 143 string TempStr = System.Console.ReadLine();
@@ -130,7 +200,7 @@ namespace OpenSim.Framework.Console
130 } 200 }
131 else 201 else
132 { 202 {
133 this.WriteLine(LogPriority.MEDIUM,"Valid options are " + OptionA + " or " + OptionB); 203 Notice("Valid options are " + OptionA + " or " + OptionB);
134 temp = CmdPrompt(prompt, defaultresponse); 204 temp = CmdPrompt(prompt, defaultresponse);
135 } 205 }
136 } 206 }
diff --git a/Common/OpenSim.Framework.Console/ConsoleCallbacksBase.cs b/Common/OpenSim.Framework.Console/ConsoleCallbacksBase.cs
index bb589d2..e3847be 100644
--- a/Common/OpenSim.Framework.Console/ConsoleCallbacksBase.cs
+++ b/Common/OpenSim.Framework.Console/ConsoleCallbacksBase.cs
@@ -1,3 +1,30 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
1using System; 28using System;
2using System.Collections.Generic; 29using System.Collections.Generic;
3using System.Text; 30using System.Text;
diff --git a/Common/OpenSim.Framework.Console/MainConsole.cs b/Common/OpenSim.Framework.Console/MainConsole.cs
index 02c4ae8..01aa3d1 100644
--- a/Common/OpenSim.Framework.Console/MainConsole.cs
+++ b/Common/OpenSim.Framework.Console/MainConsole.cs
@@ -1,5 +1,6 @@
1/* 1/*
2* Copyright (c) OpenSim project, http://sim.opensecondlife.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
3* 4*
4* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
5* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
@@ -8,14 +9,14 @@
8* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
9* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
10* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
11* * Neither the name of the <organization> nor the 12* * Neither the name of the OpenSim Project nor the
12* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
13* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
14* 15*
15* THIS SOFTWARE IS PROVIDED BY <copyright holder> ``AS IS'' AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
16* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
19* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND