From 047270bdc83d029486215a418fada27b225dbab0 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 12 Dec 2012 23:13:34 +0000
Subject: Add "debug script log" command to allow setting a numeric debug level
on individual IScriptInstances for debugging purposes.
Current, state changes and event fires can be logged for individual scripts.
See command help for more details.
---
OpenSim/Framework/Console/ConsoleUtil.cs | 28 ++++++++++++++++++++++++----
1 file changed, 24 insertions(+), 4 deletions(-)
(limited to 'OpenSim/Framework')
diff --git a/OpenSim/Framework/Console/ConsoleUtil.cs b/OpenSim/Framework/Console/ConsoleUtil.cs
index 16a63e0..dff956a 100644
--- a/OpenSim/Framework/Console/ConsoleUtil.cs
+++ b/OpenSim/Framework/Console/ConsoleUtil.cs
@@ -97,7 +97,7 @@ namespace OpenSim.Framework.Console
if (!UUID.TryParse(rawUuid, out uuid))
{
if (console != null)
- console.OutputFormat("{0} is not a valid uuid", rawUuid);
+ console.OutputFormat("ERROR: {0} is not a valid uuid", rawUuid);
return false;
}
@@ -110,7 +110,7 @@ namespace OpenSim.Framework.Console
if (!uint.TryParse(rawLocalId, out localId))
{
if (console != null)
- console.OutputFormat("{0} is not a valid local id", localId);
+ console.OutputFormat("ERROR: {0} is not a valid local id", localId);
return false;
}
@@ -118,7 +118,7 @@ namespace OpenSim.Framework.Console
if (localId == 0)
{
if (console != null)
- console.OutputFormat("{0} is not a valid local id - it must be greater than 0", localId);
+ console.OutputFormat("ERROR: {0} is not a valid local id - it must be greater than 0", localId);
return false;
}
@@ -150,10 +150,30 @@ namespace OpenSim.Framework.Console
}
if (console != null)
- console.OutputFormat("{0} is not a valid UUID or local id", rawId);
+ console.OutputFormat("ERROR: {0} is not a valid UUID or local id", rawId);
return false;
}
+
+ ///
+ /// Convert a minimum vector input from the console to an OpenMetaverse.Vector3
+ ///
+ /// Can be null if no console is available.
+ /// /param>
+ ///
+ ///
+ public static bool TryParseConsoleInt(ICommandConsole console, string rawConsoleInt, out int i)
+ {
+ if (!int.TryParse(rawConsoleInt, out i))
+ {
+ if (console != null)
+ console.OutputFormat("ERROR: {0} is not a valid integer", rawConsoleInt);
+
+ return false;
+ }
+
+ return true;
+ }
///
/// Convert a minimum vector input from the console to an OpenMetaverse.Vector3
--
cgit v1.1