diff options
Diffstat (limited to '')
77 files changed, 978 insertions, 1023 deletions
diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs index 4c4d315..f1db8d6 100644 --- a/OpenSim/Region/Application/Application.cs +++ b/OpenSim/Region/Application/Application.cs | |||
@@ -35,17 +35,20 @@ namespace OpenSim | |||
35 | { | 35 | { |
36 | public class Application | 36 | public class Application |
37 | { | 37 | { |
38 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
39 | |||
38 | public static string iniFilePath = ""; | 40 | public static string iniFilePath = ""; |
39 | 41 | ||
40 | //could move our main function into OpenSimMain and kill this class | 42 | //could move our main function into OpenSimMain and kill this class |
41 | [STAThread] | 43 | [STAThread] |
42 | public static void Main(string[] args) | 44 | public static void Main(string[] args) |
43 | { | 45 | { |
46 | log4net.Config.XmlConfigurator.Configure(); | ||
47 | |||
44 | AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); | 48 | AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); |
45 | 49 | ||
46 | Console.WriteLine("OpenSim " + VersionInfo.Version + "\n"); | 50 | Console.WriteLine("OpenSim " + VersionInfo.Version + "\n"); |
47 | 51 | ||
48 | |||
49 | Console.Write("Performing compatibility checks... "); | 52 | Console.Write("Performing compatibility checks... "); |
50 | string supported = String.Empty; | 53 | string supported = String.Empty; |
51 | if (Util.IsEnvironmentSupported(ref supported)) | 54 | if (Util.IsEnvironmentSupported(ref supported)) |
@@ -75,11 +78,10 @@ namespace OpenSim | |||
75 | OpenSimMain sim = new OpenSimMain(configSource); | 78 | OpenSimMain sim = new OpenSimMain(configSource); |
76 | 79 | ||
77 | sim.StartUp(); | 80 | sim.StartUp(); |
78 | |||
79 | 81 | ||
80 | while (true) | 82 | while (true) |
81 | { | 83 | { |
82 | MainLog.Instance.MainLogPrompt(); | 84 | MainConsole.Instance.Prompt(); |
83 | } | 85 | } |
84 | } | 86 | } |
85 | 87 | ||
@@ -112,7 +114,7 @@ namespace OpenSim | |||
112 | 114 | ||
113 | // Do we not always want to see exception messages? | 115 | // Do we not always want to see exception messages? |
114 | // if (e.IsTerminating) | 116 | // if (e.IsTerminating) |
115 | MainLog.Instance.Error("APPLICATION", msg); | 117 | MainConsole.Instance.Error("[APPLICATION]: " + msg); |
116 | 118 | ||
117 | // Try to post errormessage to an URL | 119 | // Try to post errormessage to an URL |
118 | try | 120 | try |
@@ -131,6 +133,5 @@ namespace OpenSim | |||
131 | 133 | ||
132 | _IsHandlingException=false; | 134 | _IsHandlingException=false; |
133 | } | 135 | } |
134 | |||
135 | } | 136 | } |
136 | } | 137 | } |
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 36de410..074a7b5 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -55,6 +55,8 @@ namespace OpenSim | |||
55 | 55 | ||
56 | public class OpenSimMain : RegionApplicationBase, conscmd_callback | 56 | public class OpenSimMain : RegionApplicationBase, conscmd_callback |
57 | { | 57 | { |
58 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
59 | |||
58 | private const string DEFAULT_PRIM_BACKUP_FILENAME = "prim-backup.xml"; | 60 | private const string DEFAULT_PRIM_BACKUP_FILENAME = "prim-backup.xml"; |
59 | 61 | ||
60 | public string m_physicsEngine; | 62 | public string m_physicsEngine; |
@@ -77,7 +79,6 @@ namespace OpenSim | |||
77 | 79 | ||
78 | private bool m_verbose; | 80 | private bool m_verbose; |
79 | private bool m_physicalPrim; | 81 | private bool m_physicalPrim; |
80 | private readonly string m_logFilename = "region-console.log"; | ||
81 | private bool m_permissions = false; | 82 | private bool m_permissions = false; |
82 | 83 | ||
83 | private bool m_standaloneAuthenticate = false; | 84 | private bool m_standaloneAuthenticate = false; |
@@ -146,9 +147,7 @@ namespace OpenSim | |||
146 | { | 147 | { |
147 | // no default config files, so set default values, and save it | 148 | // no default config files, so set default values, and save it |
148 | m_config.Merge(DefaultConfig()); | 149 | m_config.Merge(DefaultConfig()); |
149 | |||
150 | m_config.Merge(configSource); | 150 | m_config.Merge(configSource); |
151 | |||
152 | m_config.Save(Application.iniFilePath); | 151 | m_config.Save(Application.iniFilePath); |
153 | } | 152 | } |
154 | } | 153 | } |
@@ -233,6 +232,8 @@ namespace OpenSim | |||
233 | m_sandbox = !startupConfig.GetBoolean("gridmode", false); | 232 | m_sandbox = !startupConfig.GetBoolean("gridmode", false); |
234 | m_physicsEngine = startupConfig.GetString("physics", "basicphysics"); | 233 | m_physicsEngine = startupConfig.GetString("physics", "basicphysics"); |
235 | m_meshEngineName = startupConfig.GetString("meshing", "ZeroMesher"); | 234 | m_meshEngineName = startupConfig.GetString("meshing", "ZeroMesher"); |
235 | |||
236 | // TODO: since log4net changes, verbose flag doesn't do anything | ||
236 | m_verbose = startupConfig.GetBoolean("verbose", true); | 237 | m_verbose = startupConfig.GetBoolean("verbose", true); |
237 | 238 | ||
238 | m_physicalPrim = startupConfig.GetBoolean("physical_prim", true); | 239 | m_physicalPrim = startupConfig.GetBoolean("physical_prim", true); |
@@ -280,7 +281,6 @@ namespace OpenSim | |||
280 | //if (!m_sandbox) | 281 | //if (!m_sandbox) |
281 | //m_SendChildAgentTaskData = false; | 282 | //m_SendChildAgentTaskData = false; |
282 | 283 | ||
283 | |||
284 | m_networkServersInfo.loadFromConfiguration(m_config); | 284 | m_networkServersInfo.loadFromConfiguration(m_config); |
285 | } | 285 | } |
286 | 286 | ||
@@ -293,16 +293,8 @@ namespace OpenSim | |||
293 | // Called from app startup (OpenSim.Application) | 293 | // Called from app startup (OpenSim.Application) |
294 | // | 294 | // |
295 | 295 | ||
296 | 296 | m_console = CreateConsole(); | |
297 | // Create log directory if it doesn't exist | 297 | MainConsole.Instance = m_console; |
298 | if (!Directory.Exists(Util.logDir())) | ||
299 | { | ||
300 | Directory.CreateDirectory(Util.logDir()); | ||
301 | } | ||
302 | |||
303 | // Create a log instance | ||
304 | m_log = CreateLog(); | ||
305 | MainLog.Instance = m_log; | ||
306 | 298 | ||
307 | StatsManager.StartCollectingSimExtraStats(); | 299 | StatsManager.StartCollectingSimExtraStats(); |
308 | 300 | ||
@@ -311,7 +303,6 @@ namespace OpenSim | |||
311 | // This base will call abstract Initialize | 303 | // This base will call abstract Initialize |
312 | base.StartUp(); | 304 | base.StartUp(); |
313 | 305 | ||
314 | |||
315 | // StandAlone mode? m_sandbox is determined by !startupConfig.GetBoolean("gridmode", false) | 306 | // StandAlone mode? m_sandbox is determined by !startupConfig.GetBoolean("gridmode", false) |
316 | if (m_sandbox) | 307 | if (m_sandbox) |
317 | { | 308 | { |
@@ -357,10 +348,10 @@ namespace OpenSim | |||
357 | } | 348 | } |
358 | 349 | ||
359 | // Create a ModuleLoader instance | 350 | // Create a ModuleLoader instance |
360 | m_moduleLoader = new ModuleLoader(m_log, m_config); | 351 | m_moduleLoader = new ModuleLoader(m_config); |
361 | 352 | ||
362 | ExtensionNodeList nodes = AddinManager.GetExtensionNodes("/OpenSim/Startup"); | 353 | ExtensionNodeList nodes = AddinManager.GetExtensionNodes("/OpenSim/Startup"); |
363 | m_log.Verbose("PLUGINS", "Loading {0} OpenSim application plugins", nodes.Count); | 354 | m_log.Info(String.Format("[PLUGINS]: Loading {0} OpenSim application plugins", nodes.Count)); |
364 | 355 | ||
365 | foreach (TypeExtensionNode node in nodes) | 356 | foreach (TypeExtensionNode node in nodes) |
366 | { | 357 | { |
@@ -383,7 +374,7 @@ namespace OpenSim | |||
383 | } | 374 | } |
384 | else | 375 | else |
385 | { | 376 | { |
386 | m_log.Verbose("STARTUP", "No startup command script specified. Moving on..."); | 377 | m_log.Info("[STARTUP]: No startup command script specified. Moving on..."); |
387 | } | 378 | } |
388 | 379 | ||
389 | // Start timer script (run a script every xx seconds) | 380 | // Start timer script (run a script every xx seconds) |
@@ -396,10 +387,7 @@ namespace OpenSim | |||
396 | } | 387 | } |
397 | 388 | ||
398 | // We are done with startup | 389 | // We are done with startup |
399 | m_log.Status("STARTUP", | 390 | m_log.Info("[STARTUP]: Startup complete, serving " + m_udpServers.Count.ToString() + " region(s)"); |
400 | "Startup complete, serving " + m_udpServers.Count.ToString() + " region(s)"); | ||
401 | |||
402 | // When we return now we will be in a wait for input command loop. | ||
403 | } | 391 | } |
404 | 392 | ||
405 | protected override void Initialize() | 393 | protected override void Initialize() |
@@ -433,8 +421,9 @@ namespace OpenSim | |||
433 | assetServer = sqlAssetServer; | 421 | assetServer = sqlAssetServer; |
434 | } | 422 | } |
435 | 423 | ||
436 | m_assetCache = new AssetCache(assetServer, m_log); | 424 | m_assetCache = new AssetCache(assetServer); |
437 | // m_assetCache = new assetCache("OpenSim.Region.GridInterfaces.Local.dll", m_networkServersInfo.AssetURL, m_networkServersInfo.AssetSendKey); | 425 | // m_assetCache = new assetCache("OpenSim.Region.GridInterfaces.Local.dll", m_networkServersInfo.AssetURL, m_networkServersInfo.AssetSendKey); |
426 | |||
438 | m_sceneManager.OnRestartSim += handleRestartRegion; | 427 | m_sceneManager.OnRestartSim += handleRestartRegion; |
439 | } | 428 | } |
440 | 429 | ||
@@ -448,23 +437,23 @@ namespace OpenSim | |||
448 | UDPServer udpServer; | 437 | UDPServer udpServer; |
449 | Scene scene = SetupScene(regionInfo, out udpServer, m_permissions); | 438 | Scene scene = SetupScene(regionInfo, out udpServer, m_permissions); |
450 | 439 | ||
451 | m_log.Verbose("MODULES", "Loading Region's modules"); | 440 | m_log.Info("[MODULES]: Loading Region's modules"); |
452 | 441 | ||
453 | m_moduleLoader.PickupModules(scene, "."); | 442 | m_moduleLoader.PickupModules(scene, "."); |
454 | //m_moduleLoader.PickupModules(scene, "ScriptEngines"); | 443 | //m_moduleLoader.PickupModules(scene, "ScriptEngines"); |
455 | //m_moduleLoader.LoadRegionModules(Path.Combine("ScriptEngines", m_scriptEngine), scene); | 444 | //m_moduleLoader.LoadRegionModules(Path.Combine("ScriptEngines", m_scriptEngine), scene); |
456 | m_log.Verbose("MODULES", "Loading scripting engine modules"); | 445 | m_log.Info("[MODULES]: Loading scripting engine modules"); |
457 | foreach (string module in m_scriptEngine.Split(',')) | 446 | foreach (string module in m_scriptEngine.Split(',')) |
458 | { | 447 | { |
459 | string mod = module.Trim(" \t".ToCharArray()); // Clean up name | 448 | string mod = module.Trim(" \t".ToCharArray()); // Clean up name |
460 | m_log.Verbose("MODULES", "Loading scripting engine: " + mod); | 449 | m_log.Info("[MODULES]: Loading scripting engine: " + mod); |
461 | try | 450 | try |
462 | { | 451 | { |
463 | m_moduleLoader.LoadRegionModules(Path.Combine("ScriptEngines", mod), scene); | 452 | m_moduleLoader.LoadRegionModules(Path.Combine("ScriptEngines", mod), scene); |
464 | } | 453 | } |
465 | catch (Exception ex) | 454 | catch (Exception ex) |
466 | { | 455 | { |
467 | m_log.Error("MODULES", "Failed to load script engine: " + ex.ToString()); | 456 | m_log.Error("[MODULES]: Failed to load script engine: " + ex.ToString()); |
468 | } | 457 | } |
469 | } | 458 | } |
470 | 459 | ||
@@ -503,8 +492,7 @@ namespace OpenSim | |||
503 | SceneCommunicationService sceneGridService = new SceneCommunicationService(m_commsManager); | 492 | SceneCommunicationService sceneGridService = new SceneCommunicationService(m_commsManager); |
504 | if (m_SendChildAgentTaskData) | 493 | if (m_SendChildAgentTaskData) |
505 | { | 494 | { |
506 | m_log.Error("WARNING", | 495 | m_log.Error("[WARNING]: Send Child Agent Task Updates is enabled. This is for testing only."); |
507 | "Send Child Agent Task Updates is enabled. This is for testing only."); | ||
508 | //Thread.Sleep(12000); | 496 | //Thread.Sleep(12000); |
509 | } | 497 | } |
510 | return | 498 | return |
@@ -516,7 +504,7 @@ namespace OpenSim | |||
516 | 504 | ||
517 | public void handleRestartRegion(RegionInfo whichRegion) | 505 | public void handleRestartRegion(RegionInfo whichRegion) |
518 | { | 506 | { |
519 | m_log.Error("MAIN", "Got restart signal from SceneManager"); | 507 | m_log.Error("[MAIN]: Got restart signal from SceneManager"); |
520 | // Shutting down the UDP server | 508 | // Shutting down the UDP server |
521 | bool foundUDPServer = false; | 509 | bool foundUDPServer = false; |
522 | int UDPServerElement = 0; | 510 | int UDPServerElement = 0; |
@@ -557,14 +545,9 @@ namespace OpenSim | |||
557 | //m_sceneManager.SendSimOnlineNotification(restartingRegion.RegionHandle); | 545 | //m_sceneManager.SendSimOnlineNotification(restartingRegion.RegionHandle); |
558 | } | 546 | } |
559 | 547 | ||
560 | protected override LogBase CreateLog() | 548 | protected override ConsoleBase CreateConsole() |
561 | { | 549 | { |
562 | if (!Directory.Exists(Util.logDir())) | 550 | return new ConsoleBase("Region", this); |
563 | { | ||
564 | Directory.CreateDirectory(Util.logDir()); | ||
565 | } | ||
566 | |||
567 | return new LogBase((Path.Combine(Util.logDir(), m_logFilename)), "Region", this, m_verbose); | ||
568 | } | 551 | } |
569 | 552 | ||
570 | # region Setup methods | 553 | # region Setup methods |
@@ -609,15 +592,15 @@ namespace OpenSim | |||
609 | RunCommandScript(m_shutdownCommandsFile); | 592 | RunCommandScript(m_shutdownCommandsFile); |
610 | } | 593 | } |
611 | 594 | ||
612 | m_log.Verbose("SHUTDOWN", "Closing all threads"); | 595 | m_log.Info("[SHUTDOWN]: Closing all threads"); |
613 | m_log.Verbose("SHUTDOWN", "Killing listener thread"); | 596 | m_log.Info("[SHUTDOWN]: Killing listener thread"); |
614 | m_log.Verbose("SHUTDOWN", "Killing clients"); | 597 | m_log.Info("[SHUTDOWN]: Killing clients"); |
615 | // TODO: implement this | 598 | // TODO: implement this |
616 | m_log.Verbose("SHUTDOWN", "Closing console and terminating"); | 599 | m_log.Info("[SHUTDOWN]: Closing console and terminating"); |
617 | 600 | ||
618 | m_sceneManager.Close(); | 601 | m_sceneManager.Close(); |
619 | 602 | ||
620 | m_log.Close(); | 603 | m_console.Close(); |
621 | Environment.Exit(0); | 604 | Environment.Exit(0); |
622 | } | 605 | } |
623 | 606 | ||
@@ -637,7 +620,7 @@ namespace OpenSim | |||
637 | /// <param name="fileName"></param> | 620 | /// <param name="fileName"></param> |
638 | private void RunCommandScript(string fileName) | 621 | private void RunCommandScript(string fileName) |
639 | { | 622 | { |
640 | m_log.Verbose("COMMANDFILE", "Running " + fileName); | 623 | m_log.Info("[COMMANDFILE]: Running " + fileName); |
641 | if (File.Exists(fileName)) | 624 | if (File.Exists(fileName)) |
642 | { | 625 | { |
643 | StreamReader readFile = File.OpenText(fileName); | 626 | StreamReader readFile = File.OpenText(fileName); |
@@ -646,14 +629,14 @@ namespace OpenSim | |||
646 | { | 629 | { |
647 | if (currentCommand != String.Empty) | 630 | if (currentCommand != String.Empty) |
648 | { | 631 | { |
649 | m_log.Verbose("COMMANDFILE", "Running '" + currentCommand + "'"); | 632 | m_log.Info("[COMMANDFILE]: Running '" + currentCommand + "'"); |
650 | m_log.MainLogRunCommand(currentCommand); | 633 | m_console.RunCommand(currentCommand); |
651 | } | 634 | } |
652 | } | 635 | } |
653 | } | 636 | } |
654 | else | 637 | else |
655 | { | 638 | { |
656 | m_log.Error("COMMANDFILE", "Command script missing. Can not run commands"); | 639 | m_log.Error("[COMMANDFILE]: Command script missing. Can not run commands"); |
657 | } | 640 | } |
658 | } | 641 | } |
659 | 642 | ||
@@ -673,7 +656,7 @@ namespace OpenSim | |||
673 | break; | 656 | break; |
674 | 657 | ||
675 | case "force-update": | 658 | case "force-update": |
676 | Console.WriteLine("Updating all clients"); | 659 | m_console.Notice("Updating all clients"); |
677 | m_sceneManager.ForceCurrentSceneClientUpdate(); | 660 | m_sceneManager.ForceCurrentSceneClientUpdate(); |
678 | break; | 661 | break; |
679 | 662 | ||
@@ -692,36 +675,36 @@ namespace OpenSim | |||
692 | break; | 675 | break; |
693 | 676 | ||
694 | case "help": | 677 | case "help": |
695 | m_log.Notice("alert - send alert to a designated user or all users."); | 678 | m_console.Notice("alert - send alert to a designated user or all users."); |
696 | m_log.Notice(" alert [First] [Last] [Message] - send an alert to a user. Case sensitive."); | 679 | m_console.Notice(" alert [First] [Last] [Message] - send an alert to a user. Case sensitive."); |
697 | m_log.Notice(" alert general [Message] - send an alert to all users."); | 680 | m_console.Notice(" alert general [Message] - send an alert to all users."); |
698 | m_log.Notice("backup - trigger a simulator backup"); | 681 | m_console.Notice("backup - trigger a simulator backup"); |
699 | m_log.Notice("create user - adds a new user"); | 682 | m_console.Notice("create user - adds a new user"); |
700 | m_log.Notice("change-region [name] - sets the region that many of these commands affect."); | 683 | m_console.Notice("change-region [name] - sets the region that many of these commands affect."); |
701 | m_log.Notice("command-script [filename] - Execute command in a file."); | 684 | m_console.Notice("command-script [filename] - Execute command in a file."); |
702 | m_log.Notice("debug - debugging commands"); | 685 | m_console.Notice("debug - debugging commands"); |
703 | m_log.Notice(" packet 0..255 - print incoming/outgoing packets (0=off)"); | 686 | m_console.Notice(" packet 0..255 - print incoming/outgoing packets (0=off)"); |
704 | m_log.Notice("edit-scale [prim name] [x] [y] [z] - resize given prim"); | 687 | m_console.Notice("edit-scale [prim name] [x] [y] [z] - resize given prim"); |
705 | m_log.Notice("export-map [filename] - save image of world map"); | 688 | m_console.Notice("export-map [filename] - save image of world map"); |
706 | m_log.Notice("force-update - force an update of prims in the scene"); | 689 | m_console.Notice("force-update - force an update of prims in the scene"); |
707 | m_log.Notice("load-xml [filename] - load prims from XML"); | 690 | m_console.Notice("load-xml [filename] - load prims from XML"); |
708 | m_log.Notice("load-xml2 [filename] - load prims from XML using version 2 format"); | 691 | m_console.Notice("load-xml2 [filename] - load prims from XML using version 2 format"); |
709 | m_log.Notice("permissions [true/false] - turn on/off permissions on the scene"); | 692 | m_console.Notice("permissions [true/false] - turn on/off permissions on the scene"); |
710 | m_log.Notice("quit - equivalent to shutdown."); | 693 | m_console.Notice("quit - equivalent to shutdown."); |
711 | m_log.Notice("restart - disconnects all clients and restarts the sims in the instance."); | 694 | m_console.Notice("restart - disconnects all clients and restarts the sims in the instance."); |
712 | m_log.Notice("remove-region [name] - remove a region"); | 695 | m_console.Notice("remove-region [name] - remove a region"); |
713 | m_log.Notice("save-xml [filename] - save prims to XML"); | 696 | m_console.Notice("save-xml [filename] - save prims to XML"); |
714 | m_log.Notice("save-xml2 [filename] - save prims to XML using version 2 format"); | 697 | m_console.Notice("save-xml2 [filename] - save prims to XML using version 2 format"); |
715 | m_log.Notice("script - manually trigger scripts? or script commands?"); | 698 | m_console.Notice("script - manually trigger scripts? or script commands?"); |
716 | m_log.Notice("set-time [x] - set the current scene time phase"); | 699 | m_console.Notice("set-time [x] - set the current scene time phase"); |
717 | m_log.Notice("show users - show info about connected users."); | 700 | m_console.Notice("show users - show info about connected users."); |
718 | m_log.Notice("show modules - shows info aboutloaded modules."); | 701 | m_console.Notice("show modules - shows info aboutloaded modules."); |
719 | m_log.Notice("show stats - statistical information for this server not displayed in the client"); | 702 | m_console.Notice("show stats - statistical information for this server not displayed in the client"); |
720 | m_log.Notice("shutdown - disconnect all clients and shutdown."); | 703 | m_console.Notice("shutdown - disconnect all clients and shutdown."); |
721 | m_log.Notice("config set section field value - set a config value"); | 704 | m_console.Notice("config set section field value - set a config value"); |
722 | m_log.Notice("config get section field - get a config value"); | 705 | m_console.Notice("config get section field - get a config value"); |
723 | m_log.Notice("config save - save OpenSim.ini"); | 706 | m_console.Notice("config save - save OpenSim.ini"); |
724 | m_log.Notice("terrain help - show help for terrain commands."); | 707 | m_console.Notice("terrain help - show help for terrain commands."); |
725 | break; | 708 | break; |
726 | 709 | ||
727 | case "save-xml": | 710 | case "save-xml": |
@@ -757,8 +740,8 @@ namespace OpenSim | |||
757 | { | 740 | { |
758 | loadOffset.Z = (float) Convert.ToDecimal(cmdparams[4]); | 741 | loadOffset.Z = (float) Convert.ToDecimal(cmdparams[4]); |
759 | } | 742 | } |
760 | m_log.Error("loadOffsets <X,Y,Z> = <" + loadOffset.X + "," + loadOffset.Y + "," + | 743 | m_console.Error("loadOffsets <X,Y,Z> = <" + loadOffset.X + "," + loadOffset.Y + "," + |
761 | loadOffset.Z + ">"); | 744 | loadOffset.Z + ">"); |
762 | } | 745 | } |
763 | } | 746 | } |
764 | m_sceneManager.LoadCurrentSceneFromXml(cmdparams[0], generateNewIDS, loadOffset); | 747 | m_sceneManager.LoadCurrentSceneFromXml(cmdparams[0], generateNewIDS, loadOffset); |
@@ -796,7 +779,7 @@ namespace OpenSim | |||
796 | 779 | ||
797 | if (!m_sceneManager.RunTerrainCmdOnCurrentScene(cmdparams, ref result)) | 780 | if (!m_sceneManager.RunTerrainCmdOnCurrentScene(cmdparams, ref result)) |
798 | { | 781 | { |
799 | m_log.Error(result); | 782 | m_console.Error(result); |
800 | } | 783 | } |
801 | break; | 784 | break; |
802 | 785 | ||
@@ -867,20 +850,18 @@ namespace OpenSim | |||
867 | 850 | ||
868 | if (!m_sceneManager.TrySetCurrentScene(regionName)) | 851 | if (!m_sceneManager.TrySetCurrentScene(regionName)) |
869 | { | 852 | { |
870 | m_log.Error("Couldn't set current region to: " + regionName); | 853 | m_console.Error("Couldn't set current region to: " + regionName); |
871 | } | 854 | } |
872 | } | 855 | } |
873 | 856 | ||
874 | if (m_sceneManager.CurrentScene == null) | 857 | if (m_sceneManager.CurrentScene == null) |
875 | { | 858 | { |
876 | m_log.Notice("CONSOLE", | 859 | m_console.Error("CONSOLE", "Currently at Root level. To change region please use 'change-region <regioname>'"); |
877 | "Currently at Root level. To change region please use 'change-region <regioname>'"); | ||
878 | } | 860 | } |
879 | else | 861 | else |
880 | { | 862 | { |
881 | m_log.Notice("CONSOLE", | 863 | m_console.Error("CONSOLE", "Current Region: " + m_sceneManager.CurrentScene.RegionInfo.RegionName + |
882 | "Current Region: " + m_sceneManager.CurrentScene.RegionInfo.RegionName + | 864 | ". To change region please use 'change-region <regioname>'"); |
883 | ". To change region please use 'change-region <regioname>'"); | ||
884 | } | 865 | } |
885 | 866 | ||
886 | break; | 867 | break; |
@@ -905,8 +886,8 @@ namespace OpenSim | |||
905 | case "set": | 886 | case "set": |
906 | if (cmdparams.Length < 4) | 887 | if (cmdparams.Length < 4) |
907 | { | 888 | { |
908 | m_log.Notice(n, "SYNTAX: " + n + " SET SECTION KEY VALUE"); | 889 | m_console.Error(n, "SYNTAX: " + n + " SET SECTION KEY VALUE"); |
909 | m_log.Notice(n, "EXAMPLE: " + n + " SET ScriptEngine.DotNetEngine NumberOfScriptThreads 5"); | 890 | m_console.Error(n, "EXAMPLE: " + n + " SET ScriptEngine.DotNetEngine NumberOfScriptThreads 5"); |
910 | } | 891 | } |
911 | else | 892 | else |
912 | { | 893 | { |
@@ -916,37 +897,35 @@ namespace OpenSim | |||
916 | string _value = String.Join(" ", cmdparams, 3, cmdparams.Length - 3); | 897 | string _value = String.Join(" ", cmdparams, 3, cmdparams.Length - 3); |
917 | c.Set(cmdparams[2], _value); | 898 | c.Set(cmdparams[2], _value); |
918 | m_config.Merge(c.ConfigSource); | 899 | m_config.Merge(c.ConfigSource); |
919 | 900 | ||
920 | m_log.Notice(n, | 901 | m_console.Error(n, n + " " + n + " " + cmdparams[1] + " " + cmdparams[2] + " " + |
921 | n + " " + n + " " + cmdparams[1] + " " + cmdparams[2] + " " + | 902 | _value); |
922 | _value); | ||
923 | } | 903 | } |
924 | break; | 904 | break; |
925 | case "get": | 905 | case "get": |
926 | if (cmdparams.Length < 3) | 906 | if (cmdparams.Length < 3) |
927 | { | 907 | { |
928 | m_log.Notice(n, "SYNTAX: " + n + " GET SECTION KEY"); | 908 | m_console.Error(n, "SYNTAX: " + n + " GET SECTION KEY"); |
929 | m_log.Notice(n, "EXAMPLE: " + n + " GET ScriptEngine.DotNetEngine NumberOfScriptThreads"); | 909 | m_console.Error(n, "EXAMPLE: " + n + " GET ScriptEngine.DotNetEngine NumberOfScriptThreads"); |
930 | } | 910 | } |
931 | else | 911 | else |
932 | { | 912 | { |
933 | IConfig c = DefaultConfig().Configs[cmdparams[1]]; | 913 | IConfig c = DefaultConfig().Configs[cmdparams[1]]; |
934 | if (c == null) | 914 | if (c == null) |
935 | { | 915 | { |
936 | m_log.Notice(n, "Section \"" + cmdparams[1] + "\" does not exist."); | 916 | m_console.Notice(n, "Section \"" + cmdparams[1] + "\" does not exist."); |
937 | break; | 917 | break; |
938 | } | 918 | } |
939 | else | 919 | else |
940 | { | 920 | { |
941 | m_log.Notice(n, | 921 | m_console.Notice(n + " GET " + cmdparams[1] + " " + cmdparams[2] + ": " + |
942 | n + " GET " + cmdparams[1] + " " + cmdparams[2] + ": " + | 922 | c.GetString(cmdparams[2])); |
943 | c.GetString(cmdparams[2])); | ||
944 | } | 923 | } |
945 | } | 924 | } |
946 | 925 | ||
947 | break; | 926 | break; |
948 | case "save": | 927 | case "save": |
949 | m_log.Notice(n, "Saving configuration file: " + Application.iniFilePath); | 928 | m_console.Notice("Saving configuration file: " + Application.iniFilePath); |
950 | m_config.Save(Application.iniFilePath); | 929 | m_config.Save(Application.iniFilePath); |
951 | break; | 930 | break; |
952 | } | 931 | } |
@@ -957,7 +936,7 @@ namespace OpenSim | |||
957 | * Temporarily disabled but it would be good to have this - needs to be levered | 936 | * Temporarily disabled but it would be good to have this - needs to be levered |
958 | * in to BaseOpenSimServer (which requires a RunCmd method restrcuture probably) | 937 | * in to BaseOpenSimServer (which requires a RunCmd method restrcuture probably) |
959 | default: | 938 | default: |
960 | m_log.Error("Unknown command"); | 939 | m_console.Error("Unknown command"); |
961 | break; | 940 | break; |
962 | */ | 941 | */ |
963 | } | 942 | } |
@@ -973,18 +952,18 @@ namespace OpenSim | |||
973 | int newDebug; | 952 | int newDebug; |
974 | if (int.TryParse(args[1], out newDebug)) | 953 | if (int.TryParse(args[1], out newDebug)) |
975 | { | 954 | { |
976 | m_sceneManager.SetDebugPacketOnCurrentScene(m_log, newDebug); | 955 | m_sceneManager.SetDebugPacketOnCurrentScene(newDebug); |
977 | } | 956 | } |
978 | else | 957 | else |
979 | { | 958 | { |
980 | m_log.Error("packet debug should be 0..2"); | 959 | m_console.Error("packet debug should be 0..2"); |
981 | } | 960 | } |
982 | Console.WriteLine("New packet debug: " + newDebug.ToString()); | 961 | m_console.Notice("New packet debug: " + newDebug.ToString()); |
983 | } | 962 | } |
984 | 963 | ||
985 | break; | 964 | break; |
986 | default: | 965 | default: |
987 | m_log.Error("Unknown debug"); | 966 | m_console.Error("Unknown debug"); |
988 | break; | 967 | break; |
989 | } | 968 | } |
990 | } | 969 | } |
@@ -997,7 +976,7 @@ namespace OpenSim | |||
997 | switch (ShowWhat) | 976 | switch (ShowWhat) |
998 | { | 977 | { |
999 | case "users": | 978 | case "users": |
1000 | m_log.Notice( | 979 | m_console.Notice( |
1001 | String.Format("{0,-16}{1,-16}{2,-37}{3,-16}{4,-22}{5,-16}", "Firstname", "Lastname", | 980 | String.Format("{0,-16}{1,-16}{2,-37}{3,-16}{4,-22}{5,-16}", "Firstname", "Lastname", |
1002 | "Agent ID", "Circuit", "IP", "Region")); | 981 | "Agent ID", "Circuit", "IP", "Region")); |
1003 | 982 | ||
@@ -1015,6 +994,7 @@ namespace OpenSim | |||
1015 | { | 994 | { |
1016 | regionName = regionInfo.RegionName; | 995 | regionName = regionInfo.RegionName; |
1017 | } | 996 | } |
997 | |||
1018 | for (int i = 0; i < m_udpServers.Count; i++) | 998 | for (int i = 0; i < m_udpServers.Count; i++) |
1019 | { | 999 | { |
1020 | if (m_udpServers[i].RegionHandle == presence.RegionHandle) | 1000 | if (m_udpServers[i].RegionHandle == presence.RegionHandle) |
@@ -1023,7 +1003,8 @@ namespace OpenSim | |||
1023 | m_udpServers[i].clientCircuits_reverse.TryGetValue(presence.ControllingClient.CircuitCode, out ep); | 1003 | m_udpServers[i].clientCircuits_reverse.TryGetValue(presence.ControllingClient.CircuitCode, out ep); |
1024 | } | 1004 | } |
1025 | } | 1005 | } |
1026 | m_log.Notice( | 1006 | |
1007 | m_console.Notice( | ||
1027 | String.Format("{0,-16}{1,-16}{2,-37}{3,-16}{4,-22}{5,-16}", | 1008 | String.Format("{0,-16}{1,-16}{2,-37}{3,-16}{4,-22}{5,-16}", |
1028 | presence.Firstname, | 1009 | presence.Firstname, |
1029 | presence.Lastname, | 1010 | presence.Lastname, |
@@ -1035,10 +1016,10 @@ namespace OpenSim | |||
1035 | 1016 | ||
1036 | break; | 1017 | break; |
1037 | case "modules": | 1018 | case "modules": |
1038 | m_log.Notice("The currently loaded shared modules are:"); | 1019 | m_console.Notice("The currently loaded shared modules are:"); |
1039 | foreach (IRegionModule module in m_moduleLoader.GetLoadedSharedModules) | 1020 | foreach (IRegionModule module in m_moduleLoader.GetLoadedSharedModules) |
1040 | { | 1021 | { |
1041 | m_log.Notice("Shared Module: " + module.Name); | 1022 | m_console.Notice("Shared Module: " + module.Name); |
1042 | } | 1023 | } |
1043 | break; | 1024 | break; |
1044 | 1025 | ||
@@ -1046,21 +1027,21 @@ namespace OpenSim | |||
1046 | m_sceneManager.ForEachScene( | 1027 | m_sceneManager.ForEachScene( |
1047 | delegate(Scene scene) | 1028 | delegate(Scene scene) |
1048 | { | 1029 | { |
1049 | m_log.Notice("Region Name: " + scene.RegionInfo.RegionName + " , Region XLoc: " + | 1030 | m_console.Notice("Region Name: " + scene.RegionInfo.RegionName + " , Region XLoc: " + |
1050 | scene.RegionInfo.RegionLocX + " , Region YLoc: " + | 1031 | scene.RegionInfo.RegionLocX + " , Region YLoc: " + |
1051 | scene.RegionInfo.RegionLocY); | 1032 | scene.RegionInfo.RegionLocY); |
1052 | }); | 1033 | }); |
1053 | break; | 1034 | break; |
1054 | 1035 | ||
1055 | case "stats": | 1036 | case "stats": |
1056 | if (StatsManager.SimExtraStats != null) | 1037 | if (StatsManager.SimExtraStats != null) |
1057 | { | 1038 | { |
1058 | m_log.Notice( | 1039 | m_console.Notice( |
1059 | "STATS", Environment.NewLine + StatsManager.SimExtraStats.Report()); | 1040 | "STATS", Environment.NewLine + StatsManager.SimExtraStats.Report()); |
1060 | } | 1041 | } |
1061 | else | 1042 | else |
1062 | { | 1043 | { |
1063 | m_log.Notice("STATS", "Extra sim statistics collection has not been enabled"); | 1044 | m_console.Notice("Extra sim statistics collection has not been enabled"); |
1064 | } | 1045 | } |
1065 | break; | 1046 | break; |
1066 | } | 1047 | } |
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index 5fdb9b3..10bf0d1 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs | |||
@@ -51,6 +51,8 @@ namespace OpenSim.Region.ClientStack | |||
51 | /// </summary> | 51 | /// </summary> |
52 | public class ClientView : IClientAPI | 52 | public class ClientView : IClientAPI |
53 | { | 53 | { |
54 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
55 | |||
54 | /* static variables */ | 56 | /* static variables */ |
55 | public static TerrainManager TerrainManager; | 57 | public static TerrainManager TerrainManager; |
56 | 58 | ||
@@ -196,7 +198,7 @@ namespace OpenSim.Region.ClientStack | |||
196 | // m_inventoryCache = inventoryCache; | 198 | // m_inventoryCache = inventoryCache; |
197 | m_authenticateSessionsHandler = authenSessions; | 199 | m_authenticateSessionsHandler = authenSessions; |
198 | 200 | ||
199 | MainLog.Instance.Verbose("CLIENT", "Started up new client thread to handle incoming request"); | 201 | m_log.Info("[CLIENT]: Started up new client thread to handle incoming request"); |
200 | 202 | ||
201 | m_agentId = agentId; | 203 | m_agentId = agentId; |
202 | m_sessionId = sessionId; | 204 | m_sessionId = sessionId; |
@@ -260,7 +262,7 @@ namespace OpenSim.Region.ClientStack | |||
260 | public void Close(bool ShutdownCircult) | 262 | public void Close(bool ShutdownCircult) |
261 | { | 263 | { |
262 | // Pull Client out of Region | 264 | // Pull Client out of Region |
263 | MainLog.Instance.Verbose("CLIENT", "Close has been called"); | 265 | m_log.Info("[CLIENT]: Close has been called"); |
264 | 266 | ||
265 | //raiseevent on the packet server to Shutdown the circuit | 267 | //raiseevent on the packet server to Shutdown the circuit |
266 | if (ShutdownCircult) | 268 | if (ShutdownCircult) |
@@ -286,7 +288,7 @@ namespace OpenSim.Region.ClientStack | |||
286 | 288 | ||
287 | public void Stop() | 289 | public void Stop() |
288 | { | 290 | { |
289 | MainLog.Instance.Verbose("BUG", "Stop called, please find out where and remove it"); | 291 | m_log.Info("[BUG]: Stop called, please find out where and remove it"); |
290 | } | 292 | } |
291 | 293 | ||
292 | #endregion | 294 | #endregion |
@@ -378,7 +380,7 @@ namespace OpenSim.Region.ClientStack | |||
378 | 380 | ||
379 | protected virtual void ClientLoop() | 381 | protected virtual void ClientLoop() |
380 | { | 382 | { |
381 | MainLog.Instance.Verbose("CLIENT", "Entered loop"); | 383 | m_log.Info("[CLIENT]: Entered loop"); |
382 | while (true) | 384 | while (true) |
383 | { | 385 | { |
384 | QueItem nextPacket = m_packetQueue.Dequeue(); | 386 | QueItem nextPacket = m_packetQueue.Dequeue(); |
@@ -445,7 +447,7 @@ namespace OpenSim.Region.ClientStack | |||
445 | m_clientPingTimer.Elapsed += new ElapsedEventHandler(CheckClientConnectivity); | 447 | m_clientPingTimer.Elapsed += new ElapsedEventHandler(CheckClientConnectivity); |
446 | m_clientPingTimer.Enabled = true; | 448 | m_clientPingTimer.Enabled = true; |
447 | 449 | ||
448 | MainLog.Instance.Verbose("CLIENT", "Adding viewer agent to scene"); | 450 | m_log.Info("[CLIENT]: Adding viewer agent to scene"); |
449 | m_scene.AddNewClient(this, true); | 451 | m_scene.AddNewClient(this, true); |
450 | } | 452 | } |
451 | 453 | ||
@@ -458,13 +460,13 @@ namespace OpenSim.Region.ClientStack | |||
458 | if (!sessionInfo.Authorised) | 460 | if (!sessionInfo.Authorised) |
459 | { | 461 | { |
460 | //session/circuit not authorised | 462 | //session/circuit not authorised |
461 | MainLog.Instance.Notice("CLIENT", "New user request denied to " + m_userEndPoint.ToString()); | 463 | m_log.Info("[CLIENT]: New user request denied to " + m_userEndPoint.ToString()); |
462 | m_packetQueue.Close(); | 464 | m_packetQueue.Close(); |
463 | m_clientThread.Abort(); | 465 | m_clientThread.Abort(); |
464 | } | 466 | } |
465 | else | 467 | else |
466 | { | 468 | { |
467 | MainLog.Instance.Notice("CLIENT", "Got authenticated connection from " + m_userEndPoint.ToString()); | 469 | m_log.Info("[CLIENT]: Got authenticated connection from " + m_userEndPoint.ToString()); |
468 | //session is authorised | 470 | //session is authorised |
469 | m_firstName = sessionInfo.LoginInfo.First; | 471 | m_firstName = sessionInfo.LoginInfo.First; |
470 | m_lastName = sessionInfo.LoginInfo.Last; | 472 | m_lastName = sessionInfo.LoginInfo.Last; |
@@ -731,7 +733,7 @@ namespace OpenSim.Region.ClientStack | |||
731 | } | 733 | } |
732 | catch (Exception e) | 734 | catch (Exception e) |
733 | { | 735 | { |
734 | MainLog.Instance.Warn("client", | 736 | m_log.Warn("[client]: " + |
735 | "ClientView.API.cs: SendLayerData() - Failed with exception " + e.ToString()); | 737 | "ClientView.API.cs: SendLayerData() - Failed with exception " + e.ToString()); |
736 | } | 738 | } |
737 | } | 739 | } |
@@ -758,7 +760,7 @@ namespace OpenSim.Region.ClientStack | |||
758 | } | 760 | } |
759 | catch (Exception e) | 761 | catch (Exception e) |
760 | { | 762 | { |
761 | MainLog.Instance.Warn("client", | 763 | m_log.Warn("[client]: " + |
762 | "ClientView.API.cs: SendLayerData() - Failed with exception " + e.ToString()); | 764 | "ClientView.API.cs: SendLayerData() - Failed with exception " + e.ToString()); |
763 | } | 765 | } |
764 | } | 766 | } |
@@ -2102,7 +2104,7 @@ namespace OpenSim.Region.ClientStack | |||
2102 | 2104 | ||
2103 | protected virtual bool Logout(IClientAPI client, Packet packet) | 2105 | protected virtual bool Logout(IClientAPI client, Packet packet) |
2104 | { | 2106 | { |
2105 | MainLog.Instance.Verbose("CLIENT", "Got a logout request"); | 2107 | m_log.Info("[CLIENT]: Got a logout request"); |
2106 | 2108 | ||
2107 | if (OnLogout != null) | 2109 | if (OnLogout != null) |
2108 | { | 2110 | { |
@@ -2431,10 +2433,10 @@ namespace OpenSim.Region.ClientStack | |||
2431 | } | 2433 | } |
2432 | catch (Exception e) | 2434 | catch (Exception e) |
2433 | { | 2435 | { |
2434 | MainLog.Instance.Warn("client", | 2436 | m_log.Warn("[client]: " + |
2435 | "ClientView.m_packetQueue.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection " + | 2437 | "ClientView.m_packetQueue.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection " + |
2436 | m_userEndPoint.ToString() + " - killing thread"); | 2438 | m_userEndPoint.ToString() + " - killing thread"); |
2437 | MainLog.Instance.Error(e.ToString()); | 2439 | m_log.Error(e.ToString()); |
2438 | Close(true); | 2440 | Close(true); |
2439 | } | 2441 | } |
2440 | } | 2442 | } |
@@ -2545,7 +2547,7 @@ namespace OpenSim.Region.ClientStack | |||
2545 | { | 2547 | { |
2546 | if ((now - packet.TickCount > RESEND_TIMEOUT) && (!packet.Header.Resent)) | 2548 | if ((now - packet.TickCount > RESEND_TIMEOUT) && (!packet.Header.Resent)) |
2547 | { | 2549 | { |
2548 | MainLog.Instance.Verbose("NETWORK", "Resending " + packet.Type.ToString() + " packet, " + | 2550 | m_log.Info("[NETWORK]: Resending " + packet.Type.ToString() + " packet, " + |
2549 | (now - packet.TickCount) + "ms have passed"); | 2551 | (now - packet.TickCount) + "ms have passed"); |
2550 | 2552 | ||
2551 | packet.Header.Resent = true; | 2553 | packet.Header.Resent = true; |
@@ -2564,11 +2566,11 @@ namespace OpenSim.Region.ClientStack | |||
2564 | if (m_pendingAcks.Count > 250) | 2566 | if (m_pendingAcks.Count > 250) |
2565 | { | 2567 | { |
2566 | // FIXME: Handle the odd case where we have too many pending ACKs queued up | 2568 | // FIXME: Handle the odd case where we have too many pending ACKs queued up |
2567 | MainLog.Instance.Verbose("NETWORK", "Too many ACKs queued up!"); | 2569 | m_log.Info("[NETWORK]: Too many ACKs queued up!"); |
2568 | return; | 2570 | return; |
2569 | } | 2571 | } |
2570 | 2572 | ||
2571 | //MainLog.Instance.Verbose("NETWORK", "Sending PacketAck"); | 2573 | //m_log.Info("[NETWORK]: Sending PacketAck"); |
2572 | 2574 | ||
2573 | int i = 0; | 2575 | int i = 0; |
2574 | PacketAckPacket acks = (PacketAckPacket)PacketPool.Instance.GetPacket(PacketType.PacketAck); | 2576 | PacketAckPacket acks = (PacketAckPacket)PacketPool.Instance.GetPacket(PacketType.PacketAck); |
@@ -2754,7 +2756,7 @@ namespace OpenSim.Region.ClientStack | |||
2754 | //rezPacket.RezData.RemoveItem; | 2756 | //rezPacket.RezData.RemoveItem; |
2755 | //rezPacket.RezData.RezSelected; | 2757 | //rezPacket.RezData.RezSelected; |
2756 | //rezPacket.RezData.FromTaskID; | 2758 | //rezPacket.RezData.FromTaskID; |
2757 | //MainLog.Instance.Verbose("REZData", rezPacket.ToString()); | 2759 | //m_log.Info("[REZData]: " + rezPacket.ToString()); |
2758 | OnRezObject(this, rezPacket.InventoryData.ItemID, rezPacket.RezData.RayEnd, | 2760 | OnRezObject(this, rezPacket.InventoryData.ItemID, rezPacket.RezData.RayEnd, |
2759 | rezPacket.RezData.RayStart, rezPacket.RezData.RayTargetID, | 2761 | rezPacket.RezData.RayStart, rezPacket.RezData.RayTargetID, |
2760 | rezPacket.RezData.BypassRaycast, rezPacket.RezData.RayEndIsIntersection, | 2762 | rezPacket.RezData.BypassRaycast, rezPacket.RezData.RayEndIsIntersection, |
@@ -2772,7 +2774,7 @@ namespace OpenSim.Region.ClientStack | |||
2772 | break; | 2774 | break; |
2773 | case PacketType.ModifyLand: | 2775 | case PacketType.ModifyLand: |
2774 | ModifyLandPacket modify = (ModifyLandPacket)Pack; | 2776 | ModifyLandPacket modify = (ModifyLandPacket)Pack; |
2775 | //MainLog.Instance.Verbose("LAND", "LAND:" + modify.ToString()); | 2777 | //m_log.Info("[LAND]: LAND:" + modify.ToString()); |
2776 | if (modify.ParcelData.Length > 0) | 2778 | if (modify.ParcelData.Length > 0) |
2777 | { | 2779 | { |
2778 | if (OnModifyTerrain != null) | 2780 | if (OnModifyTerrain != null) |
@@ -2941,7 +2943,7 @@ namespace OpenSim.Region.ClientStack | |||
2941 | { | 2943 | { |
2942 | ObjectAddPacket addPacket = (ObjectAddPacket)Pack; | 2944 | ObjectAddPacket addPacket = (ObjectAddPacket)Pack; |
2943 | PrimitiveBaseShape shape = GetShapeFromAddPacket(addPacket); | 2945 | PrimitiveBaseShape shape = GetShapeFromAddPacket(addPacket); |
2944 | // MainLog.Instance.Verbose("REZData", addPacket.ToString()); | 2946 | // m_log.Info("[REZData]: " + addPacket.ToString()); |
2945 | //BypassRaycast: 1 | 2947 | //BypassRaycast: 1 |
2946 | //RayStart: <69.79469, 158.2652, 98.40343> | 2948 | //RayStart: <69.79469, 158.2652, 98.40343> |
2947 | //RayEnd: <61.97724, 141.995, 92.58341> | 2949 | //RayEnd: <61.97724, 141.995, 92.58341> |
@@ -3068,7 +3070,7 @@ namespace OpenSim.Region.ClientStack | |||
3068 | } | 3070 | } |
3069 | break; | 3071 | break; |
3070 | case PacketType.ObjectPermissions: | 3072 | case PacketType.ObjectPermissions: |
3071 | MainLog.Instance.Warn("CLIENT", "unhandled packet " + PacketType.ObjectPermissions.ToString()); | 3073 | m_log.Warn("[CLIENT]: unhandled packet " + PacketType.ObjectPermissions.ToString()); |
3072 | ObjectPermissionsPacket newobjPerms = (ObjectPermissionsPacket)Pack; | 3074 | ObjectPermissionsPacket newobjPerms = (ObjectPermissionsPacket)Pack; |
3073 | 3075 | ||
3074 | List<ObjectPermissionsPacket.ObjectDataBlock> permChanges = | 3076 | List<ObjectPermissionsPacket.ObjectDataBlock> permChanges = |
@@ -3344,7 +3346,7 @@ namespace OpenSim.Region.ClientStack | |||
3344 | } | 3346 | } |
3345 | break; | 3347 | break; |
3346 | case PacketType.MoveTaskInventory: | 3348 | case PacketType.MoveTaskInventory: |
3347 | MainLog.Instance.Warn("CLIENT", "unhandled MoveTaskInventory packet"); | 3349 | m_log.Warn("[CLIENT]: unhandled MoveTaskInventory packet"); |
3348 | break; | 3350 | break; |
3349 | case PacketType.RezScript: | 3351 | case PacketType.RezScript: |
3350 | //Console.WriteLine(Pack.ToString()); | 3352 | //Console.WriteLine(Pack.ToString()); |
@@ -3594,7 +3596,7 @@ namespace OpenSim.Region.ClientStack | |||
3594 | 3596 | ||
3595 | break; | 3597 | break; |
3596 | case PacketType.GodKickUser: | 3598 | case PacketType.GodKickUser: |
3597 | MainLog.Instance.Warn("CLIENT", "unhandled GodKickUser packet"); | 3599 | m_log.Warn("[CLIENT]: unhandled GodKickUser packet"); |
3598 | 3600 | ||
3599 | GodKickUserPacket gkupack = (GodKickUserPacket)Pack; | 3601 | GodKickUserPacket gkupack = (GodKickUserPacket)Pack; |
3600 | 3602 | ||
@@ -3624,88 +3626,88 @@ namespace OpenSim.Region.ClientStack | |||
3624 | // Send the client the ping response back | 3626 | // Send the client the ping response back |
3625 | // Pass the same PingID in the matching packet | 3627 | // Pass the same PingID in the matching packet |
3626 | // Handled In the packet processing | 3628 | // Handled In the packet processing |
3627 | //MainLog.Instance.Debug("CLIENT", "possibly unhandled StartPingCheck packet"); | 3629 | //m_log.Debug("[CLIENT]: possibly unhandled StartPingCheck packet"); |
3628 | break; | 3630 | break; |
3629 | case PacketType.CompletePingCheck: | 3631 | case PacketType.CompletePingCheck: |
3630 | // TODO: Perhaps this should be processed on the Sim to determine whether or not to drop a dead client | 3632 | // TODO: Perhaps this should be processed on the Sim to determine whether or not to drop a dead client |
3631 | //MainLog.Instance.Warn("CLIENT", "unhandled CompletePingCheck packet"); | 3633 | //m_log.Warn("[CLIENT]: unhandled CompletePingCheck packet"); |
3632 | break; | 3634 | break; |
3633 | case PacketType.ObjectScale: | 3635 | case PacketType.ObjectScale: |
3634 | // TODO: handle this packet | 3636 | // TODO: handle this packet |
3635 | MainLog.Instance.Warn("CLIENT", "unhandled ObjectScale packet"); | 3637 | m_log.Warn("[CLIENT]: unhandled ObjectScale packet"); |
3636 | break; | 3638 | break; |
3637 | case PacketType.ViewerStats: | 3639 | case PacketType.ViewerStats: |
3638 | // TODO: handle this packet | 3640 | // TODO: handle this packet |
3639 | MainLog.Instance.Warn("CLIENT", "unhandled ViewerStats packet"); | 3641 | m_log.Warn("[CLIENT]: unhandled ViewerStats packet"); |
3640 | break; | 3642 | break; |
3641 | 3643 | ||
3642 | case PacketType.CreateGroupRequest: | 3644 | case PacketType.CreateGroupRequest: |
3643 | // TODO: handle this packet | 3645 | // TODO: handle this packet |
3644 | MainLog.Instance.Warn("CLIENT", "unhandled CreateGroupRequest packet"); | 3646 | m_log.Warn("[CLIENT]: unhandled CreateGroupRequest packet"); |
3645 | break; | 3647 | break; |
3646 | case PacketType.GenericMessage: | 3648 | case PacketType.GenericMessage: |
3647 | // TODO: handle this packet | 3649 | // TODO: handle this packet |
3648 | MainLog.Instance.Warn("CLIENT", "unhandled GenericMessage packet"); | 3650 | m_log.Warn("[CLIENT]: unhandled GenericMessage packet"); |
3649 | break; | 3651 | break; |
3650 | case PacketType.MapItemRequest: | 3652 | case PacketType.MapItemRequest: |
3651 | // TODO: handle this packet | 3653 | // TODO: handle this packet |
3652 | MainLog.Instance.Warn("CLIENT", "unhandled MapItemRequest packet"); | 3654 | m_log.Warn("[CLIENT]: unhandled MapItemRequest packet"); |
3653 | break; | 3655 | break; |
3654 | case PacketType.AgentResume: | 3656 | case PacketType.AgentResume: |
3655 | // TODO: handle this packet | 3657 | // TODO: handle this packet |
3656 | MainLog.Instance.Warn("CLIENT", "unhandled AgentResume packet"); | 3658 | m_log.Warn("[CLIENT]: unhandled AgentResume packet"); |
3657 | break; | 3659 | break; |
3658 | case PacketType.AgentPause: | 3660 | case PacketType.AgentPause: |
3659 | // TODO: handle this packet | 3661 | // TODO: handle this packet |
3660 | MainLog.Instance.Warn("CLIENT", "unhandled AgentPause packet"); | 3662 | m_log.Warn("[CLIENT]: unhandled AgentPause packet"); |
3661 | break; | 3663 | break; |
3662 | case PacketType.TransferAbort: | 3664 | case PacketType.TransferAbort: |
3663 | // TODO: handle this packet | 3665 | // TODO: handle this packet |
3664 | MainLog.Instance.Warn("CLIENT", "unhandled TransferAbort packet"); | 3666 | m_log.Warn("[CLIENT]: unhandled TransferAbort packet"); |
3665 | break; | 3667 | break; |
3666 | case PacketType.MuteListRequest: | 3668 | case PacketType.MuteListRequest: |
3667 | // TODO: handle this packet | 3669 | // TODO: handle this packet |
3668 | MainLog.Instance.Warn("CLIENT", "unhandled MuteListRequest packet"); | 3670 | m_log.Warn("[CLIENT]: unhandled MuteListRequest packet"); |
3669 | break; | 3671 | break; |
3670 | case PacketType.AgentDataUpdateRequest: | 3672 | case PacketType.AgentDataUpdateRequest: |
3671 | // TODO: handle this packet | 3673 | // TODO: handle this packet |
3672 | MainLog.Instance.Warn("CLIENT", "unhandled AgentDataUpdateRequest packet"); | 3674 | m_log.Warn("[CLIENT]: unhandled AgentDataUpdateRequest packet"); |
3673 | break; | 3675 | break; |
3674 | 3676 | ||
3675 | case PacketType.ParcelDwellRequest: | 3677 | case PacketType.ParcelDwellRequest: |
3676 | // TODO: handle this packet | 3678 | // TODO: handle this packet |
3677 | MainLog.Instance.Warn("CLIENT", "unhandled ParcelDwellRequest packet"); | 3679 | m_log.Warn("[CLIENT]: unhandled ParcelDwellRequest packet"); |
3678 | break; | 3680 | break; |
3679 | case PacketType.UseCircuitCode: | 3681 | case PacketType.UseCircuitCode: |
3680 | // TODO: handle this packet | 3682 | // TODO: handle this packet |
3681 | //MainLog.Instance.Warn("CLIENT", "unhandled UseCircuitCode packet"); | 3683 | //m_log.Warn("[CLIENT]: unhandled UseCircuitCode packet"); |
3682 | break; | 3684 | break; |
3683 | case PacketType.EconomyDataRequest: | 3685 | case PacketType.EconomyDataRequest: |
3684 | // TODO: handle this packet | 3686 | // TODO: handle this packet |
3685 | MainLog.Instance.Warn("CLIENT", "unhandled EconomyDataRequest packet"); | 3687 | m_log.Warn("[CLIENT]: unhandled EconomyDataRequest packet"); |
3686 | break; | 3688 | break; |
3687 | case PacketType.AgentHeightWidth: | 3689 | case PacketType.AgentHeightWidth: |
3688 | // TODO: handle this packet | 3690 | // TODO: handle this packet |
3689 | MainLog.Instance.Warn("CLIENT", "unhandled AgentHeightWidth packet"); | 3691 | m_log.Warn("[CLIENT]: unhandled AgentHeightWidth packet"); |
3690 | break; | 3692 | break; |
3691 | case PacketType.ObjectSpinStop: | 3693 | case PacketType.ObjectSpinStop: |
3692 | // TODO: handle this packet | 3694 | // TODO: handle this packet |
3693 | MainLog.Instance.Warn("CLIENT", "unhandled ObjectSpinStop packet"); | 3695 | m_log.Warn("[CLIENT]: unhandled ObjectSpinStop packet"); |
3694 | break; | 3696 | break; |
3695 | case PacketType.SoundTrigger: | 3697 | case PacketType.SoundTrigger: |
3696 | // TODO: handle this packet | 3698 | // TODO: handle this packet |
3697 | MainLog.Instance.Warn("CLIENT", "unhandled SoundTrigger packet"); | 3699 | m_log.Warn("[CLIENT]: unhandled SoundTrigger packet"); |
3698 | break; | 3700 | break; |
3699 | case PacketType.UserInfoRequest: | 3701 | case PacketType.UserInfoRequest: |
3700 | // TODO: handle this packet | 3702 | // TODO: handle this packet |
3701 | MainLog.Instance.Warn("CLIENT", "unhandled UserInfoRequest packet"); | 3703 | m_log.Warn("[CLIENT]: unhandled UserInfoRequest packet"); |
3702 | break; | 3704 | break; |
3703 | case PacketType.InventoryDescendents: | 3705 | case PacketType.InventoryDescendents: |
3704 | // TODO: handle this packet | 3706 | // TODO: handle this packet |
3705 | MainLog.Instance.Warn("CLIENT", "unhandled InventoryDescent packet"); | 3707 | m_log.Warn("[CLIENT]: unhandled InventoryDescent packet"); |
3706 | break; | 3708 | break; |
3707 | default: | 3709 | default: |
3708 | MainLog.Instance.Warn("CLIENT", "unhandled packet " + Pack.ToString()); | 3710 | m_log.Warn("[CLIENT]: unhandled packet " + Pack.ToString()); |
3709 | break; | 3711 | break; |
3710 | 3712 | ||
3711 | #endregion | 3713 | #endregion |
diff --git a/OpenSim/Region/ClientStack/PacketQueue.cs b/OpenSim/Region/ClientStack/PacketQueue.cs index 685f91b..8b2a93a 100644 --- a/OpenSim/Region/ClientStack/PacketQueue.cs +++ b/OpenSim/Region/ClientStack/PacketQueue.cs | |||
@@ -37,6 +37,8 @@ namespace OpenSim.Region.ClientStack | |||
37 | { | 37 | { |
38 | public class PacketQueue | 38 | public class PacketQueue |
39 | { | 39 | { |
40 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
41 | |||
40 | private bool m_enabled = true; | 42 | private bool m_enabled = true; |
41 | 43 | ||
42 | private BlockingQueue<QueItem> SendQueue; | 44 | private BlockingQueue<QueItem> SendQueue; |
@@ -204,7 +206,7 @@ namespace OpenSim.Region.ClientStack | |||
204 | SendQueue.Enqueue(AssetOutgoingPacketQueue.Dequeue()); | 206 | SendQueue.Enqueue(AssetOutgoingPacketQueue.Dequeue()); |
205 | } | 207 | } |
206 | } | 208 | } |
207 | // MainLog.Instance.Verbose("THROTTLE", "Processed " + throttleLoops + " packets"); | 209 | // m_log.Info("[THROTTLE]: Processed " + throttleLoops + " packets"); |
208 | } | 210 | } |
209 | } | 211 | } |
210 | 212 | ||
@@ -253,7 +255,7 @@ namespace OpenSim.Region.ClientStack | |||
253 | lock (this) | 255 | lock (this) |
254 | { | 256 | { |
255 | ResetCounters(); | 257 | ResetCounters(); |
256 | // MainLog.Instance.Verbose("THROTTLE", "Entering Throttle"); | 258 | // m_log.Info("[THROTTLE]: Entering Throttle"); |
257 | while (TotalThrottle.UnderLimit() && PacketsWaiting() && | 259 | while (TotalThrottle.UnderLimit() && PacketsWaiting() && |
258 | (throttleLoops <= MaxThrottleLoops)) | 260 | (throttleLoops <= MaxThrottleLoops)) |
259 | { | 261 | { |
@@ -316,7 +318,7 @@ namespace OpenSim.Region.ClientStack | |||
316 | AssetThrottle.Add(qpack.Packet.ToBytes().Length); | 318 | AssetThrottle.Add(qpack.Packet.ToBytes().Length); |
317 | } | 319 | } |
318 | } | 320 | } |
319 | // MainLog.Instance.Verbose("THROTTLE", "Processed " + throttleLoops + " packets"); | 321 | // m_log.Info("[THROTTLE]: Processed " + throttleLoops + " packets"); |
320 | } | 322 | } |
321 | } | 323 | } |
322 | 324 | ||
@@ -426,7 +428,7 @@ namespace OpenSim.Region.ClientStack | |||
426 | 428 | ||
427 | tall = tResend + tLand + tWind + tCloud + tTask + tTexture + tAsset; | 429 | tall = tResend + tLand + tWind + tCloud + tTask + tTexture + tAsset; |
428 | /* | 430 | /* |
429 | MainLog.Instance.Verbose("CLIENT", "Client AgentThrottle - Got throttle:resendbytes=" + tResend + | 431 | m_log.Info("[CLIENT]: Client AgentThrottle - Got throttle:resendbytes=" + tResend + |
430 | " landbytes=" + tLand + | 432 | " landbytes=" + tLand + |
431 | " windbytes=" + tWind + | 433 | " windbytes=" + tWind + |
432 | " cloudbytes=" + tCloud + | 434 | " cloudbytes=" + tCloud + |
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index 72917d1..8a042b1 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs | |||
@@ -42,6 +42,8 @@ namespace OpenSim.Region.ClientStack | |||
42 | { | 42 | { |
43 | public abstract class RegionApplicationBase : BaseOpenSimServer | 43 | public abstract class RegionApplicationBase : BaseOpenSimServer |
44 | { | 44 | { |
45 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
46 | |||
45 | protected AssetCache m_assetCache; | 47 | protected AssetCache m_assetCache; |
46 | protected Dictionary<EndPoint, uint> m_clientCircuits = new Dictionary<EndPoint, uint>(); | 48 | protected Dictionary<EndPoint, uint> m_clientCircuits = new Dictionary<EndPoint, uint>(); |
47 | protected NetworkServersInfo m_networkServersInfo; | 49 | protected NetworkServersInfo m_networkServersInfo; |
@@ -75,19 +77,20 @@ namespace OpenSim.Region.ClientStack | |||
75 | 77 | ||
76 | m_httpServer = new BaseHttpServer(m_httpServerPort); | 78 | m_httpServer = new BaseHttpServer(m_httpServerPort); |
77 | 79 | ||
78 | m_log.Status("REGION", "Starting HTTP server"); | 80 | m_log.Info("[REGION]: Starting HTTP server"); |
81 | |||
79 | m_httpServer.Start(); | 82 | m_httpServer.Start(); |
80 | } | 83 | } |
81 | 84 | ||
82 | protected abstract void Initialize(); | 85 | protected abstract void Initialize(); |
83 | 86 | ||
84 | protected void StartLog() | 87 | protected void StartConsole() |
85 | { | 88 | { |
86 | m_log = CreateLog(); | 89 | m_console = CreateConsole(); |
87 | MainLog.Instance = m_log; | 90 | MainConsole.Instance = m_console; |
88 | } | 91 | } |
89 | 92 | ||
90 | protected abstract LogBase CreateLog(); | 93 | protected abstract ConsoleBase CreateConsole(); |
91 | protected abstract PhysicsScene GetPhysicsScene(); | 94 | protected abstract PhysicsScene GetPhysicsScene(); |
92 | protected abstract StorageManager CreateStorageManager(string connectionstring); | 95 | protected abstract StorageManager CreateStorageManager(string connectionstring); |
93 | 96 | ||
@@ -107,7 +110,7 @@ namespace OpenSim.Region.ClientStack | |||
107 | // listenIP = IPAddress.Parse("0.0.0.0"); | 110 | // listenIP = IPAddress.Parse("0.0.0.0"); |
108 | 111 | ||
109 | uint port = (uint) regionInfo.InternalEndPoint.Port; | 112 | uint port = (uint) regionInfo.InternalEndPoint.Port; |
110 | udpServer = new UDPServer(listenIP, ref port, regionInfo.m_allow_alternate_ports, m_assetCache, m_log, circuitManager); | 113 | udpServer = new UDPServer(listenIP, ref port, regionInfo.m_allow_alternate_ports, m_assetCache, circuitManager); |
111 | regionInfo.InternalEndPoint.Port = (int)port; | 114 | regionInfo.InternalEndPoint.Port = (int)port; |
112 | 115 | ||
113 | Scene scene = CreateScene(regionInfo, m_storageManager, circuitManager); | 116 | Scene scene = CreateScene(regionInfo, m_storageManager, circuitManager); |
@@ -136,12 +139,12 @@ namespace OpenSim.Region.ClientStack | |||
136 | 139 | ||
137 | if (masterAvatar != null) | 140 | if (masterAvatar != null) |
138 | { | 141 | { |
139 | m_log.Verbose("PARCEL", "Found master avatar [" + masterAvatar.UUID.ToString() + "]"); | 142 | m_log.Info("[PARCEL]: Found master avatar [" + masterAvatar.UUID.ToString() + "]"); |
140 | scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID; | 143 | scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID; |
141 | } | 144 | } |
142 | else | 145 | else |
143 | { | 146 | { |
144 | m_log.Verbose("PARCEL", "No master avatar found, using null."); | 147 | m_log.Info("[PARCEL]: No master avatar found, using null."); |
145 | scene.RegionInfo.MasterAvatarAssignedUUID = LLUUID.Zero; | 148 | scene.RegionInfo.MasterAvatarAssignedUUID = LLUUID.Zero; |
146 | } | 149 | } |
147 | 150 | ||
diff --git a/OpenSim/Region/ClientStack/UDPServer.cs b/OpenSim/Region/ClientStack/UDPServer.cs index 3e2b536..f9918ff 100644 --- a/OpenSim/Region/ClientStack/UDPServer.cs +++ b/OpenSim/Region/ClientStack/UDPServer.cs | |||
@@ -39,6 +39,8 @@ namespace OpenSim.Region.ClientStack | |||
39 | { | 39 | { |
40 | public class UDPServer : ClientStackNetworkHandler | 40 | public class UDPServer : ClientStackNetworkHandler |
41 | { | 41 | { |
42 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
43 | |||
42 | protected Dictionary<EndPoint, uint> clientCircuits = new Dictionary<EndPoint, uint>(); | 44 | protected Dictionary<EndPoint, uint> clientCircuits = new Dictionary<EndPoint, uint>(); |
43 | public Dictionary<uint, EndPoint> clientCircuits_reverse = new Dictionary<uint, EndPoint>(); | 45 | public Dictionary<uint, EndPoint> clientCircuits_reverse = new Dictionary<uint, EndPoint>(); |
44 | public Socket Server; | 46 | public Socket Server; |
@@ -56,7 +58,6 @@ namespace OpenSim.Region.ClientStack | |||
56 | protected IPAddress listenIP = IPAddress.Parse("0.0.0.0"); | 58 | protected IPAddress listenIP = IPAddress.Parse("0.0.0.0"); |
57 | protected IScene m_localScene; | 59 | protected IScene m_localScene; |
58 | protected AssetCache m_assetCache; | 60 | protected AssetCache m_assetCache; |
59 | protected LogBase m_log; | ||
60 | protected AgentCircuitManager m_authenticateSessionsClass; | 61 | protected AgentCircuitManager m_authenticateSessionsClass; |
61 | 62 | ||
62 | public PacketServer PacketServer | 63 | public PacketServer PacketServer |
@@ -84,13 +85,12 @@ namespace OpenSim.Region.ClientStack | |||
84 | { | 85 | { |
85 | } | 86 | } |
86 | 87 | ||
87 | public UDPServer(IPAddress _listenIP, ref uint port, bool allow_alternate_port, AssetCache assetCache, LogBase console, AgentCircuitManager authenticateClass) | 88 | public UDPServer(IPAddress _listenIP, ref uint port, bool allow_alternate_port, AssetCache assetCache, AgentCircuitManager authenticateClass) |
88 | { | 89 | { |
89 | listenIP = _listenIP; | 90 | listenIP = _listenIP; |
90 | listenPort = port; | 91 | listenPort = port; |
91 | Allow_Alternate_Port = allow_alternate_port; | 92 | Allow_Alternate_Port = allow_alternate_port; |
92 | m_assetCache = assetCache; | 93 | m_assetCache = assetCache; |
93 | m_log = console; | ||
94 | m_authenticateSessionsClass = authenticateClass; | 94 | m_authenticateSessionsClass = authenticateClass; |
95 | CreatePacketServer(); | 95 | CreatePacketServer(); |
96 | 96 | ||
@@ -121,7 +121,7 @@ namespace OpenSim.Region.ClientStack | |||
121 | { | 121 | { |
122 | // TODO : Actually only handle those states that we have control over, re-throw everything else, | 122 | // TODO : Actually only handle those states that we have control over, re-throw everything else, |
123 | // TODO: implement cases as we encounter them. | 123 | // TODO: implement cases as we encounter them. |
124 | //m_log.Error("UDPSERVER", "Connection Error! - " + e.ToString()); | 124 | //m_log.Error("[UDPSERVER]: Connection Error! - " + e.ToString()); |
125 | switch (e.SocketErrorCode) | 125 | switch (e.SocketErrorCode) |
126 | { | 126 | { |
127 | case SocketError.AlreadyInProgress: | 127 | case SocketError.AlreadyInProgress: |
@@ -134,7 +134,7 @@ namespace OpenSim.Region.ClientStack | |||
134 | } | 134 | } |
135 | catch (Exception a) | 135 | catch (Exception a) |
136 | { | 136 | { |
137 | MainLog.Instance.Verbose("UDPSERVER", a.ToString()); | 137 | m_log.Info("[UDPSERVER]: " + a.ToString()); |
138 | } | 138 | } |
139 | try | 139 | try |
140 | { | 140 | { |
@@ -159,7 +159,7 @@ namespace OpenSim.Region.ClientStack | |||
159 | } | 159 | } |
160 | catch (Exception) | 160 | catch (Exception) |
161 | { | 161 | { |
162 | //MainLog.Instance.Verbose("UDPSERVER", a.ToString()); | 162 | //m_log.Info("[UDPSERVER]" + a.ToString()); |
163 | } | 163 | } |
164 | try | 164 | try |
165 | { | 165 | { |
@@ -191,8 +191,7 @@ namespace OpenSim.Region.ClientStack | |||
191 | } | 191 | } |
192 | catch (ObjectDisposedException) | 192 | catch (ObjectDisposedException) |
193 | { | 193 | { |
194 | 194 | //m_log.Debug("[UDPSERVER]: " + e.ToString()); | |
195 | //MainLog.Instance.Debug("UDPSERVER", e.ToString()); | ||
196 | return; | 195 | return; |
197 | } | 196 | } |
198 | 197 | ||
@@ -214,20 +213,20 @@ namespace OpenSim.Region.ClientStack | |||
214 | if (clientCircuits.TryGetValue(epSender, out circuit)) | 213 | if (clientCircuits.TryGetValue(epSender, out circuit)) |
215 | { | 214 | { |
216 | //if so then send packet to the packetserver | 215 | //if so then send packet to the packetserver |
217 | //MainLog.Instance.Warn("UDPSERVER", "ALREADY HAVE Circuit!"); | 216 | //m_log.Warn("[UDPSERVER]: ALREADY HAVE Circuit!"); |
218 | m_packetServer.InPacket(circuit, packet); | 217 | m_packetServer.InPacket(circuit, packet); |
219 | } | 218 | } |
220 | else if (packet.Type == PacketType.UseCircuitCode) | 219 | else if (packet.Type == PacketType.UseCircuitCode) |
221 | { | 220 | { |
222 | // new client | 221 | // new client |
223 | MainLog.Instance.Debug("UDPSERVER", "Adding New Client"); | 222 | m_log.Debug("[UDPSERVER]: Adding New Client"); |
224 | AddNewClient(packet); | 223 | AddNewClient(packet); |
225 | } | 224 | } |
226 | else | 225 | else |
227 | { | 226 | { |
228 | // invalid client | 227 | // invalid client |
229 | //CFK: This message seems to have served its usefullness as of 12-15 so I am commenting it out for now | 228 | //CFK: This message seems to have served its usefullness as of 12-15 so I am commenting it out for now |
230 | //m_log.Warn("UDPSERVER", "Got a packet from an invalid client - " + packet.ToString()); | 229 | //m_log.Warn("[UDPSERVER]: Got a packet from an invalid client - " + packet.ToString()); |
231 | 230 | ||
232 | } | 231 | } |
233 | } | 232 | } |
@@ -255,12 +254,11 @@ namespace OpenSim.Region.ClientStack | |||
255 | 254 | ||
256 | public void ServerListener() | 255 | public void ServerListener() |
257 | { | 256 | { |
258 | |||
259 | uint newPort = listenPort; | 257 | uint newPort = listenPort; |
260 | for (uint i = 0; i < 20; i++) | 258 | for (uint i = 0; i < 20; i++) |
261 | { | 259 | { |
262 | newPort = listenPort + i; | 260 | newPort = listenPort + i; |
263 | m_log.Verbose("SERVER", "Opening UDP socket on " + listenIP.ToString() + " " + newPort + ".");// Allow alternate ports: " + Allow_Alternate_Port.ToString()); | 261 | m_log.Info("[SERVER]: Opening UDP socket on " + listenIP.ToString() + " " + newPort + ".");// Allow alternate ports: " + Allow_Alternate_Port.ToString()); |
264 | try | 262 | try |
265 | { | 263 | { |
266 | ServerIncoming = new IPEndPoint(listenIP, (int) newPort); | 264 | ServerIncoming = new IPEndPoint(listenIP, (int) newPort); |
@@ -276,19 +274,19 @@ namespace OpenSim.Region.ClientStack | |||
276 | throw (ex); | 274 | throw (ex); |
277 | 275 | ||
278 | // We are looking for alternate ports! | 276 | // We are looking for alternate ports! |
279 | m_log.Verbose("SERVER", "UDP socket on " + listenIP.ToString() + " " + listenPort.ToString() + " is not available, trying next."); | 277 | m_log.Info("[SERVER]: UDP socket on " + listenIP.ToString() + " " + listenPort.ToString() + " is not available, trying next."); |
280 | } | 278 | } |
281 | System.Threading.Thread.Sleep(100); // Wait before we retry socket | 279 | System.Threading.Thread.Sleep(100); // Wait before we retry socket |
282 | } | 280 | } |
283 | 281 | ||
284 | m_log.Verbose("SERVER", "UDP socket bound, getting ready to listen"); | 282 | m_log.Info("[SERVER]: UDP socket bound, getting ready to listen"); |
285 | 283 | ||
286 | ipeSender = new IPEndPoint(listenIP, 0); | 284 | ipeSender = new IPEndPoint(listenIP, 0); |
287 | epSender = (EndPoint) ipeSender; | 285 | epSender = (EndPoint) ipeSender; |
288 | ReceivedData = new AsyncCallback(OnReceivedData); | 286 | ReceivedData = new AsyncCallback(OnReceivedData); |
289 | Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); | 287 | Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); |
290 | 288 | ||
291 | m_log.Status("SERVER", "Listening on port " + newPort); | 289 | m_log.Info("[SERVER]: Listening on port " + newPort); |
292 | } | 290 | } |
293 | 291 | ||
294 | public virtual void RegisterPacketServer(PacketServer server) | 292 | public virtual void RegisterPacketServer(PacketServer server) |
diff --git a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs index 25452c1..98419ab 100644 --- a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs +++ b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs | |||
@@ -36,6 +36,8 @@ namespace OpenSim.Region.Communications.Local | |||
36 | { | 36 | { |
37 | public class LocalBackEndServices : IGridServices, IInterRegionCommunications | 37 | public class LocalBackEndServices : IGridServices, IInterRegionCommunications |
38 | { | 38 | { |
39 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
40 | |||
39 | protected Dictionary<ulong, RegionInfo> m_regions = new Dictionary<ulong, RegionInfo>(); | 41 | protected Dictionary<ulong, RegionInfo> m_regions = new Dictionary<ulong, RegionInfo>(); |
40 | 42 | ||
41 | protected Dictionary<ulong, RegionCommsListener> m_regionListeners = | 43 | protected Dictionary<ulong, RegionCommsListener> m_regionListeners = |
@@ -93,8 +95,9 @@ namespace OpenSim.Region.Communications.Local | |||
93 | RegionCommsListener regionHost = new RegionCommsListener(); | 95 | RegionCommsListener regionHost = new RegionCommsListener(); |
94 | if (m_regionListeners.ContainsKey(regionInfo.RegionHandle)) | 96 | if (m_regionListeners.ContainsKey(regionInfo.RegionHandle)) |
95 | { | 97 | { |
96 | MainLog.Instance.Error("INTERREGION", | 98 | m_log.Error("[INTERREGION]: " + |
97 | "Error:Region registered twice as an Events listener for Interregion Communications but not as a listed region. In Standalone mode this will cause BIG issues. In grid mode, it means a region went down and came back up."); | 99 | "Error:Region registered twice as an Events listener for Interregion Communications but not as a listed region. " + |
100 | "In Standalone mode this will cause BIG issues. In grid mode, it means a region went down and came back up."); | ||
98 | m_regionListeners.Remove(regionInfo.RegionHandle); | 101 | m_regionListeners.Remove(regionInfo.RegionHandle); |
99 | } | 102 | } |
100 | m_regionListeners.Add(regionInfo.RegionHandle, regionHost); | 103 | m_regionListeners.Add(regionInfo.RegionHandle, regionHost); |
@@ -105,7 +108,7 @@ namespace OpenSim.Region.Communications.Local | |||
105 | { | 108 | { |
106 | // Already in our list, so the region went dead and restarted. | 109 | // Already in our list, so the region went dead and restarted. |
107 | m_regions.Remove(regionInfo.RegionHandle); | 110 | m_regions.Remove(regionInfo.RegionHandle); |
108 | MainLog.Instance.Warn("INTERREGION", "Region registered twice. Region went down and came back up."); | 111 | m_log.Warn("[INTERREGION]: Region registered twice. Region went down and came back up."); |
109 | 112 | ||
110 | RegionCommsListener regionHost = new RegionCommsListener(); | 113 | RegionCommsListener regionHost = new RegionCommsListener(); |
111 | if (m_regionListeners.ContainsKey(regionInfo.RegionHandle)) | 114 | if (m_regionListeners.ContainsKey(regionInfo.RegionHandle)) |
@@ -229,7 +232,7 @@ namespace OpenSim.Region.Communications.Local | |||
229 | { | 232 | { |
230 | // Console.WriteLine("CommsManager- Informing a region to expect child agent"); | 233 | // Console.WriteLine("CommsManager- Informing a region to expect child agent"); |
231 | m_regionListeners[regionHandle].TriggerChildAgentUpdate(regionHandle, cAgentData); | 234 | m_regionListeners[regionHandle].TriggerChildAgentUpdate(regionHandle, cAgentData); |
232 | //MainLog.Instance.Verbose("INTER", rdebugRegionName + ":Local BackEnd: Got Listener trigginering local event: " + agentData.firstname + " " + agentData.lastname); | 235 | //m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: Got Listener trigginering local event: " + agentData.firstname + " " + agentData.lastname); |
233 | 236 | ||
234 | return true; | 237 | return true; |
235 | } | 238 | } |
@@ -292,13 +295,13 @@ namespace OpenSim.Region.Communications.Local | |||
292 | //should change from agentCircuitData | 295 | //should change from agentCircuitData |
293 | { | 296 | { |
294 | //Console.WriteLine("CommsManager- Trying to Inform a region to expect child agent"); | 297 | //Console.WriteLine("CommsManager- Trying to Inform a region to expect child agent"); |
295 | //MainLog.Instance.Verbose("INTER", rdebugRegionName + ":Local BackEnd: Trying to inform region of child agent: " + agentData.firstname + " " + agentData.lastname); | 298 | //m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: Trying to inform region of child agent: " + agentData.firstname + " " + agentData.lastname); |
296 | 299 | ||
297 | if (m_regionListeners.ContainsKey(regionHandle)) | 300 | if (m_regionListeners.ContainsKey(regionHandle)) |
298 | { | 301 | { |
299 | // Console.WriteLine("CommsManager- Informing a region to expect child agent"); | 302 | // Console.WriteLine("CommsManager- Informing a region to expect child agent"); |
300 | m_regionListeners[regionHandle].TriggerExpectUser(regionHandle, agentData); | 303 | m_regionListeners[regionHandle].TriggerExpectUser(regionHandle, agentData); |
301 | //MainLog.Instance.Verbose("INTER", rdebugRegionName + ":Local BackEnd: Got Listener trigginering local event: " + agentData.firstname + " " + agentData.lastname); | 304 | //m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: Got Listener trigginering local event: " + agentData.firstname + " " + agentData.lastname); |
302 | 305 | ||
303 | return true; | 306 | return true; |
304 | } | 307 | } |
@@ -389,11 +392,11 @@ namespace OpenSim.Region.Communications.Local | |||
389 | 392 | ||
390 | public void TriggerExpectUser(ulong regionHandle, AgentCircuitData agent) | 393 | public void TriggerExpectUser(ulong regionHandle, AgentCircuitData agent) |
391 | { | 394 | { |
392 | //MainLog.Instance.Verbose("INTER", rdebugRegionName + ":Local BackEnd: Other region is sending child agent our way: " + agent.firstname + " " + agent.lastname); | 395 | //m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: Other region is sending child agent our way: " + agent.firstname + " " + agent.lastname); |
393 | 396 | ||
394 | if (m_regionListeners.ContainsKey(regionHandle)) | 397 | if (m_regionListeners.ContainsKey(regionHandle)) |
395 | { | 398 | { |
396 | //MainLog.Instance.Verbose("INTER", rdebugRegionName + ":Local BackEnd: FoundLocalRegion To send it to: " + agent.firstname + " " + agent.lastname); | 399 | //m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: FoundLocalRegion To send it to: " + agent.firstname + " " + agent.lastname); |
397 | 400 | ||
398 | m_regionListeners[regionHandle].TriggerExpectUser(regionHandle, agent); | 401 | m_regionListeners[regionHandle].TriggerExpectUser(regionHandle, agent); |
399 | } | 402 | } |
@@ -443,11 +446,11 @@ namespace OpenSim.Region.Communications.Local | |||
443 | 446 | ||
444 | public bool IncomingChildAgent(ulong regionHandle, AgentCircuitData agentData) | 447 | public bool IncomingChildAgent(ulong regionHandle, AgentCircuitData agentData) |
445 | { | 448 | { |
446 | // MainLog.Instance.Verbose("INTER", rdebugRegionName + ":Local BackEnd: Other local region is sending child agent our way: " + agentData.firstname + " " + agentData.lastname); | 449 | // m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: Other local region is sending child agent our way: " + agentData.firstname + " " + agentData.lastname); |
447 | 450 | ||
448 | if (m_regionListeners.ContainsKey(regionHandle)) | 451 | if (m_regionListeners.ContainsKey(regionHandle)) |
449 | { | 452 | { |
450 | //MainLog.Instance.Verbose("INTER", rdebugRegionName + ":Local BackEnd: found local region to trigger event on: " + agentData.firstname + " " + agentData.lastname); | 453 | //m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: found local region to trigger event on: " + agentData.firstname + " " + agentData.lastname); |
451 | 454 | ||
452 | TriggerExpectUser(regionHandle, agentData); | 455 | TriggerExpectUser(regionHandle, agentData); |
453 | return true; | 456 | return true; |
diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs index 2848b8a..f6dd379 100644 --- a/OpenSim/Region/Communications/Local/LocalLoginService.cs +++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs | |||
@@ -44,6 +44,8 @@ namespace OpenSim.Region.Communications.Local | |||
44 | 44 | ||
45 | public class LocalLoginService : LoginService | 45 | public class LocalLoginService : LoginService |
46 | { | 46 | { |
47 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
48 | |||
47 | private CommunicationsLocal m_Parent; | 49 | private CommunicationsLocal m_Parent; |
48 | 50 | ||
49 | private NetworkServersInfo serversInfo; | 51 | private NetworkServersInfo serversInfo; |
@@ -77,7 +79,7 @@ namespace OpenSim.Region.Communications.Local | |||
77 | if (!authUsers) | 79 | if (!authUsers) |
78 | { | 80 | { |
79 | //no current user account so make one | 81 | //no current user account so make one |
80 | MainLog.Instance.Notice("LOGIN", "No user account found so creating a new one."); | 82 | m_log.Info("[LOGIN]: No user account found so creating a new one."); |
81 | 83 | ||
82 | m_userManager.AddUserProfile(firstname, lastname, "test", defaultHomeX, defaultHomeY); | 84 | m_userManager.AddUserProfile(firstname, lastname, "test", defaultHomeX, defaultHomeY); |
83 | 85 | ||
@@ -97,14 +99,14 @@ namespace OpenSim.Region.Communications.Local | |||
97 | if (!authUsers) | 99 | if (!authUsers) |
98 | { | 100 | { |
99 | //for now we will accept any password in sandbox mode | 101 | //for now we will accept any password in sandbox mode |
100 | MainLog.Instance.Notice("LOGIN", "Authorising user (no actual password check)"); | 102 | m_log.Info("[LOGIN]: Authorising user (no actual password check)"); |
101 | 103 | ||
102 | return true; | 104 | return true; |
103 | } | 105 | } |
104 | else | 106 | else |
105 | { | 107 | { |
106 | MainLog.Instance.Notice( | 108 | m_log.Info( |
107 | "LOGIN", "Authenticating " + profile.username + " " + profile.surname); | 109 | "[LOGIN]: Authenticating " + profile.username + " " + profile.surname); |
108 | 110 | ||
109 | if (!password.StartsWith("$1$")) | 111 | if (!password.StartsWith("$1$")) |
110 | password = "$1$" + Util.Md5Hash(password); | 112 | password = "$1$" + Util.Md5Hash(password); |
@@ -166,7 +168,7 @@ namespace OpenSim.Region.Communications.Local | |||
166 | } | 168 | } |
167 | else | 169 | else |
168 | { | 170 | { |
169 | MainLog.Instance.Warn("LOGIN", "Not found region " + currentRegion); | 171 | m_log.Warn("[LOGIN]: Not found region " + currentRegion); |
170 | } | 172 | } |
171 | } | 173 | } |
172 | private LoginResponse.BuddyList ConvertFriendListItem(List<FriendListItem> LFL) | 174 | private LoginResponse.BuddyList ConvertFriendListItem(List<FriendListItem> LFL) |
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index 1576bf3..f04574a 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | |||
@@ -47,6 +47,8 @@ namespace OpenSim.Region.Communications.OGS1 | |||
47 | { | 47 | { |
48 | public class OGS1GridServices : IGridServices, IInterRegionCommunications | 48 | public class OGS1GridServices : IGridServices, IInterRegionCommunications |
49 | { | 49 | { |
50 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
51 | |||
50 | private LocalBackEndServices m_localBackend = new LocalBackEndServices(); | 52 | private LocalBackEndServices m_localBackend = new LocalBackEndServices(); |
51 | private Dictionary<ulong, RegionInfo> m_remoteRegionInfoCache = new Dictionary<ulong, RegionInfo>(); | 53 | private Dictionary<ulong, RegionInfo> m_remoteRegionInfoCache = new Dictionary<ulong, RegionInfo>(); |
52 | private List<SimpleRegionInfo> m_knownRegions = new List<SimpleRegionInfo>(); | 54 | private List<SimpleRegionInfo> m_knownRegions = new List<SimpleRegionInfo>(); |
@@ -138,7 +140,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
138 | GridResp = GridReq.Send(serversInfo.GridURL, 10000); | 140 | GridResp = GridReq.Send(serversInfo.GridURL, 10000); |
139 | } catch (Exception ex) | 141 | } catch (Exception ex) |
140 | { | 142 | { |
141 | MainLog.Instance.Error("Unable to connect to grid. Grid server not running?"); | 143 | m_log.Error("Unable to connect to grid. Grid server not running?"); |
142 | throw(ex); | 144 | throw(ex); |
143 | } | 145 | } |
144 | Hashtable GridRespData = (Hashtable)GridResp.Value; | 146 | Hashtable GridRespData = (Hashtable)GridResp.Value; |
@@ -148,7 +150,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
148 | if (GridRespData.ContainsKey("error")) | 150 | if (GridRespData.ContainsKey("error")) |
149 | { | 151 | { |
150 | string errorstring = (string) GridRespData["error"]; | 152 | string errorstring = (string) GridRespData["error"]; |
151 | MainLog.Instance.Error("Unable to connect to grid: " + errorstring); | 153 | m_log.Error("Unable to connect to grid: " + errorstring); |
152 | return null; | 154 | return null; |
153 | } | 155 | } |
154 | else | 156 | else |
@@ -330,9 +332,9 @@ namespace OpenSim.Region.Communications.OGS1 | |||
330 | } | 332 | } |
331 | catch (WebException) | 333 | catch (WebException) |
332 | { | 334 | { |
333 | MainLog.Instance.Error("GRID", | 335 | m_log.Error("[GRID]: " + |
334 | "Region lookup failed for: " + regionHandle.ToString() + | 336 | "Region lookup failed for: " + regionHandle.ToString() + |
335 | " - Is the GridServer down?"); | 337 | " - Is the GridServer down?"); |
336 | return null; | 338 | return null; |
337 | } | 339 | } |
338 | } | 340 | } |
@@ -421,7 +423,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
421 | } | 423 | } |
422 | catch (Exception e) | 424 | catch (Exception e) |
423 | { | 425 | { |
424 | MainLog.Instance.Error("MapBlockQuery XMLRPC failure: " + e.ToString()); | 426 | m_log.Error("MapBlockQuery XMLRPC failure: " + e.ToString()); |
425 | return new Hashtable(); | 427 | return new Hashtable(); |
426 | } | 428 | } |
427 | } | 429 | } |
@@ -482,7 +484,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
482 | 484 | ||
483 | m_localBackend.TriggerExpectUser(regionHandle, agentData); | 485 | m_localBackend.TriggerExpectUser(regionHandle, agentData); |
484 | 486 | ||
485 | MainLog.Instance.Verbose("GRID", "Welcoming new user..."); | 487 | m_log.Info("[GRID]: Welcoming new user..."); |
486 | 488 | ||
487 | return new XmlRpcResponse(); | 489 | return new XmlRpcResponse(); |
488 | } | 490 | } |
@@ -555,7 +557,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
555 | Console.WriteLine("remoting object not found"); | 557 | Console.WriteLine("remoting object not found"); |
556 | } | 558 | } |
557 | remObject = null; | 559 | remObject = null; |
558 | //MainLog.Instance.Verbose("INTER", | 560 | //m_log.Info("[INTER]: " + |
559 | //gdebugRegionName + | 561 | //gdebugRegionName + |
560 | //": OGS1 tried to Update Child Agent data on outside region and got " + | 562 | //": OGS1 tried to Update Child Agent data on outside region and got " + |
561 | //retValue.ToString()); | 563 | //retValue.ToString()); |
@@ -569,45 +571,45 @@ namespace OpenSim.Region.Communications.OGS1 | |||
569 | catch (RemotingException e) | 571 | catch (RemotingException e) |
570 | { | 572 | { |
571 | NoteDeadRegion(regionHandle); | 573 | NoteDeadRegion(regionHandle); |
572 | MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + | 574 | m_log.Warn("Remoting Error: Unable to connect to adjacent region: " + |
573 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 575 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
574 | MainLog.Instance.Debug(e.ToString()); | 576 | m_log.Debug(e.ToString()); |
575 | return false; | 577 | return false; |
576 | } | 578 | } |
577 | catch (SocketException e) | 579 | catch (SocketException e) |
578 | { | 580 | { |
579 | NoteDeadRegion(regionHandle); | 581 | NoteDeadRegion(regionHandle); |
580 | MainLog.Instance.Warn("Socket Error: Unable to connect to adjacent region: " + " " + | 582 | m_log.Warn("Socket Error: Unable to connect to adjacent region: " + " " + |
581 | regInfo.RegionLocX + "," + regInfo.RegionLocY); | 583 | regInfo.RegionLocX + "," + regInfo.RegionLocY); |
582 | MainLog.Instance.Debug(e.ToString()); | 584 | m_log.Debug(e.ToString()); |
583 | return false; | 585 | return false; |
584 | } | 586 | } |
585 | catch (InvalidCredentialException e) | 587 | catch (InvalidCredentialException e) |
586 | { | 588 | { |
587 | NoteDeadRegion(regionHandle); | 589 | NoteDeadRegion(regionHandle); |
588 | MainLog.Instance.Warn("Invalid Credentials: Unable to connect to adjacent region: " + | 590 | m_log.Warn("Invalid Credentials: Unable to connect to adjacent region: " + |
589 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 591 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
590 | MainLog.Instance.Debug(e.ToString()); | 592 | m_log.Debug(e.ToString()); |
591 | return false; | 593 | return false; |
592 | } | 594 | } |
593 | catch (AuthenticationException e) | 595 | catch (AuthenticationException e) |
594 | { | 596 | { |
595 | NoteDeadRegion(regionHandle); | 597 | NoteDeadRegion(regionHandle); |
596 | MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region: " + | 598 | m_log.Warn("Authentication exception: Unable to connect to adjacent region: " + |
597 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 599 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
598 | MainLog.Instance.Debug(e.ToString()); | 600 | m_log.Debug(e.ToString()); |
599 | return false; | 601 | return false; |
600 | } | 602 | } |
601 | catch (Exception e) | 603 | catch (Exception e) |
602 | { | 604 | { |
603 | NoteDeadRegion(regionHandle); | 605 | NoteDeadRegion(regionHandle); |
604 | MainLog.Instance.Debug(e.ToString()); | 606 | m_log.Debug(e.ToString()); |
605 | return false; | 607 | return false; |
606 | } | 608 | } |
607 | } | 609 | } |
608 | else | 610 | else |
609 | { | 611 | { |
610 | //MainLog.Instance.Verbose("INTERREGION", "Skipped Sending Child Update to a region because it failed too many times:" + regionHandle.ToString()); | 612 | //m_log.Info("[INTERREGION]: Skipped Sending Child Update to a region because it failed too many times:" + regionHandle.ToString()); |
611 | return false; | 613 | return false; |
612 | } | 614 | } |
613 | } | 615 | } |
@@ -650,10 +652,10 @@ namespace OpenSim.Region.Communications.OGS1 | |||
650 | Console.WriteLine("remoting object not found"); | 652 | Console.WriteLine("remoting object not found"); |
651 | } | 653 | } |
652 | remObject = null; | 654 | remObject = null; |
653 | MainLog.Instance.Verbose("INTER", | 655 | m_log.Info("[INTER]: " + |
654 | gdebugRegionName + ": OGS1 tried to InformRegionOfChildAgent for " + | 656 | gdebugRegionName + ": OGS1 tried to InformRegionOfChildAgent for " + |
655 | agentData.firstname + " " + agentData.lastname + " and got " + | 657 | agentData.firstname + " " + agentData.lastname + " and got " + |
656 | retValue.ToString()); | 658 | retValue.ToString()); |
657 | 659 | ||
658 | return retValue; | 660 | return retValue; |
659 | 661 | ||
@@ -664,41 +666,41 @@ namespace OpenSim.Region.Communications.OGS1 | |||
664 | catch (RemotingException e) | 666 | catch (RemotingException e) |
665 | { | 667 | { |
666 | NoteDeadRegion(regionHandle); | 668 | NoteDeadRegion(regionHandle); |
667 | MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName + | 669 | m_log.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName + |
668 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 670 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
669 | MainLog.Instance.Debug(e.ToString()); | 671 | m_log.Debug(e.ToString()); |
670 | return false; | 672 | return false; |
671 | } | 673 | } |
672 | catch (SocketException e) | 674 | catch (SocketException e) |
673 | { | 675 | { |
674 | NoteDeadRegion(regionHandle); | 676 | NoteDeadRegion(regionHandle); |
675 | MainLog.Instance.Warn("Socket Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " + | 677 | m_log.Warn("Socket Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " + |
676 | regInfo.RegionLocX + "," + regInfo.RegionLocY); | 678 | regInfo.RegionLocX + "," + regInfo.RegionLocY); |
677 | MainLog.Instance.Debug(e.ToString()); | 679 | m_log.Debug(e.ToString()); |
678 | return false; | 680 | return false; |
679 | } | 681 | } |
680 | catch (InvalidCredentialException e) | 682 | catch (InvalidCredentialException e) |
681 | { | 683 | { |
682 | NoteDeadRegion(regionHandle); | 684 | NoteDeadRegion(regionHandle); |
683 | MainLog.Instance.Warn("Invalid Credentials: Unable to connect to adjacent region: " + regInfo.RegionName + | 685 | m_log.Warn("Invalid Credentials: Unable to connect to adjacent region: " + regInfo.RegionName + |
684 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 686 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
685 | MainLog.Instance.Debug(e.ToString()); | 687 | m_log.Debug(e.ToString()); |
686 | return false; | 688 | return false; |
687 | } | 689 | } |
688 | catch (AuthenticationException e) | 690 | catch (AuthenticationException e) |
689 | { | 691 | { |
690 | NoteDeadRegion(regionHandle); | 692 | NoteDeadRegion(regionHandle); |
691 | MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region: " + | 693 | m_log.Warn("Authentication exception: Unable to connect to adjacent region: " + |
692 | regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 694 | regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
693 | MainLog.Instance.Debug(e.ToString()); | 695 | m_log.Debug(e.ToString()); |
694 | return false; | 696 | return false; |
695 | } | 697 | } |
696 | catch (Exception e) | 698 | catch (Exception e) |
697 | { | 699 | { |
698 | NoteDeadRegion(regionHandle); | 700 | NoteDeadRegion(regionHandle); |
699 | MainLog.Instance.Warn("Unknown exception: Unable to connect to adjacent region: " + regInfo.RegionName + | 701 | m_log.Warn("Unknown exception: Unable to connect to adjacent region: " + regInfo.RegionName + |
700 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 702 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
701 | MainLog.Instance.Debug(e.ToString()); | 703 | m_log.Debug(e.ToString()); |
702 | return false; | 704 | return false; |
703 | } | 705 | } |
704 | } | 706 | } |
@@ -748,7 +750,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
748 | Console.WriteLine("remoting object not found"); | 750 | Console.WriteLine("remoting object not found"); |
749 | } | 751 | } |
750 | remObject = null; | 752 | remObject = null; |
751 | MainLog.Instance.Verbose("INTER", gdebugRegionName + ": OGS1 tried to inform region I'm up"); | 753 | m_log.Info("[INTER]: " + gdebugRegionName + ": OGS1 tried to inform region I'm up"); |
752 | 754 | ||
753 | return retValue; | 755 | return retValue; |
754 | } | 756 | } |
@@ -765,49 +767,49 @@ namespace OpenSim.Region.Communications.OGS1 | |||
765 | } | 767 | } |
766 | catch (RemotingException e) | 768 | catch (RemotingException e) |
767 | { | 769 | { |
768 | MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region using tcp://" + | 770 | m_log.Warn("Remoting Error: Unable to connect to adjacent region using tcp://" + |
769 | regInfo.RemotingAddress + | 771 | regInfo.RemotingAddress + |
770 | ":" + regInfo.RemotingPort + | 772 | ":" + regInfo.RemotingPort + |
771 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY + | 773 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY + |
772 | " - Is this neighbor up?"); | 774 | " - Is this neighbor up?"); |
773 | MainLog.Instance.Debug(e.ToString()); | 775 | m_log.Debug(e.ToString()); |
774 | return false; | 776 | return false; |
775 | } | 777 | } |
776 | catch (SocketException e) | 778 | catch (SocketException e) |
777 | { | 779 | { |
778 | MainLog.Instance.Warn("Socket Error: Unable to connect to adjacent region using tcp://" + | 780 | m_log.Warn("Socket Error: Unable to connect to adjacent region using tcp://" + |
779 | regInfo.RemotingAddress + | 781 | regInfo.RemotingAddress + |
780 | ":" + regInfo.RemotingPort + | 782 | ":" + regInfo.RemotingPort + |
781 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY + | 783 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY + |
782 | " - Is this neighbor up?"); | 784 | " - Is this neighbor up?"); |
783 | MainLog.Instance.Debug(e.ToString()); | 785 | m_log.Debug(e.ToString()); |
784 | return false; | 786 | return false; |
785 | } | 787 | } |
786 | catch (InvalidCredentialException e) | 788 | catch (InvalidCredentialException e) |
787 | { | 789 | { |
788 | MainLog.Instance.Warn("Invalid Credentials: Unable to connect to adjacent region using tcp://" + | 790 | m_log.Warn("Invalid Credentials: Unable to connect to adjacent region using tcp://" + |
789 | regInfo.RemotingAddress + | 791 | regInfo.RemotingAddress + |
790 | ":" + regInfo.RemotingPort + | 792 | ":" + regInfo.RemotingPort + |
791 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 793 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
792 | MainLog.Instance.Debug(e.ToString()); | 794 | m_log.Debug(e.ToString()); |
793 | return false; | 795 | return false; |
794 | } | 796 | } |
795 | catch (AuthenticationException e) | 797 | catch (AuthenticationException e) |
796 | { | 798 | { |
797 | MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region using tcp://" + | 799 | m_log.Warn("Authentication exception: Unable to connect to adjacent region using tcp://" + |
798 | regInfo.RemotingAddress + | 800 | regInfo.RemotingAddress + |
799 | ":" + regInfo.RemotingPort + | 801 | ":" + regInfo.RemotingPort + |
800 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 802 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
801 | MainLog.Instance.Debug(e.ToString()); | 803 | m_log.Debug(e.ToString()); |
802 | return false; | 804 | return false; |
803 | } | 805 | } |
804 | catch (Exception e) | 806 | catch (Exception e) |
805 | { | 807 | { |
806 | // This line errors with a Null Reference Exception.. Why? @.@ | 808 | // This line errors with a Null Reference Exception.. Why? @.@ |
807 | //MainLog.Instance.Warn("Unknown exception: Unable to connect to adjacent region using tcp://" + regInfo.RemotingAddress + | 809 | //m_log.Warn("Unknown exception: Unable to connect to adjacent region using tcp://" + regInfo.RemotingAddress + |
808 | // ":" + regInfo.RemotingPort + | 810 | // ":" + regInfo.RemotingPort + |
809 | //"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY + " - This is likely caused by an incompatibility in the protocol between this sim and that one"); | 811 | //"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY + " - This is likely caused by an incompatibility in the protocol between this sim and that one"); |
810 | MainLog.Instance.Debug(e.ToString()); | 812 | m_log.Debug(e.ToString()); |
811 | return false; | 813 | return false; |
812 | } | 814 | } |
813 | } | 815 | } |
@@ -860,41 +862,41 @@ namespace OpenSim.Region.Communications.OGS1 | |||
860 | catch (RemotingException e) | 862 | catch (RemotingException e) |
861 | { | 863 | { |
862 | NoteDeadRegion(regionHandle); | 864 | NoteDeadRegion(regionHandle); |
863 | MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName + | 865 | m_log.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName + |
864 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 866 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
865 | MainLog.Instance.Debug(e.ToString()); | 867 | m_log.Debug(e.ToString()); |
866 | return false; | 868 | return false; |
867 | } | 869 | } |
868 | catch (SocketException e) | 870 | catch (SocketException e) |
869 | { | 871 | { |
870 | NoteDeadRegion(regionHandle); | 872 | NoteDeadRegion(regionHandle); |
871 | MainLog.Instance.Warn("Socket Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " + | 873 | m_log.Warn("Socket Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " + |
872 | regInfo.RegionLocX + "," + regInfo.RegionLocY); | 874 | regInfo.RegionLocX + "," + regInfo.RegionLocY); |
873 | MainLog.Instance.Debug(e.ToString()); | 875 | m_log.Debug(e.ToString()); |
874 | return false; | 876 | return false; |
875 | } | 877 | } |
876 | catch (InvalidCredentialException e) | 878 | catch (InvalidCredentialException e) |
877 | { | 879 | { |
878 | NoteDeadRegion(regionHandle); | 880 | NoteDeadRegion(regionHandle); |
879 | MainLog.Instance.Warn("Invalid Credentials: Unable to connect to adjacent region: " + regInfo.RegionName + | 881 | m_log.Warn("Invalid Credentials: Unable to connect to adjacent region: " + regInfo.RegionName + |
880 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 882 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
881 | MainLog.Instance.Debug(e.ToString()); | 883 | m_log.Debug(e.ToString()); |
882 | return false; | 884 | return false; |
883 | } | 885 | } |
884 | catch (AuthenticationException e) | 886 | catch (AuthenticationException e) |
885 | { | 887 | { |
886 | NoteDeadRegion(regionHandle); | 888 | NoteDeadRegion(regionHandle); |
887 | MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region: " + | 889 | m_log.Warn("Authentication exception: Unable to connect to adjacent region: " + |
888 | regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 890 | regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
889 | MainLog.Instance.Debug(e.ToString()); | 891 | m_log.Debug(e.ToString()); |
890 | return false; | 892 | return false; |
891 | } | 893 | } |
892 | catch (Exception e) | 894 | catch (Exception e) |
893 | { | 895 | { |
894 | NoteDeadRegion(regionHandle); | 896 | NoteDeadRegion(regionHandle); |
895 | MainLog.Instance.Warn("Unknown exception: Unable to connect to adjacent region: " + regInfo.RegionName + | 897 | m_log.Warn("Unknown exception: Unable to connect to adjacent region: " + regInfo.RegionName + |
896 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 898 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
897 | MainLog.Instance.Debug(e.ToString()); | 899 | m_log.Debug(e.ToString()); |
898 | return false; | 900 | return false; |
899 | } | 901 | } |
900 | } | 902 | } |
@@ -947,9 +949,9 @@ namespace OpenSim.Region.Communications.OGS1 | |||
947 | catch (RemotingException e) | 949 | catch (RemotingException e) |
948 | { | 950 | { |
949 | NoteDeadRegion(regionHandle); | 951 | NoteDeadRegion(regionHandle); |
950 | MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName + | 952 | m_log.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName + |
951 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 953 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
952 | MainLog.Instance.Debug(e.ToString()); | 954 | m_log.Debug(e.ToString()); |
953 | return false; | 955 | return false; |
954 | } | 956 | } |
955 | catch | 957 | catch |
@@ -1000,9 +1002,9 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1000 | catch (RemotingException e) | 1002 | catch (RemotingException e) |
1001 | { | 1003 | { |
1002 | NoteDeadRegion(regionHandle); | 1004 | NoteDeadRegion(regionHandle); |
1003 | MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName + | 1005 | m_log.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName + |
1004 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 1006 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
1005 | MainLog.Instance.Debug(e.ToString()); | 1007 | m_log.Debug(e.ToString()); |
1006 | return false; | 1008 | return false; |
1007 | } | 1009 | } |
1008 | catch | 1010 | catch |
@@ -1052,61 +1054,61 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1052 | catch (RemotingException e) | 1054 | catch (RemotingException e) |
1053 | { | 1055 | { |
1054 | NoteDeadRegion(regionHandle); | 1056 | NoteDeadRegion(regionHandle); |
1055 | MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region to tell it to close child agents: " + regInfo.RegionName + | 1057 | m_log.Warn("Remoting Error: Unable to connect to adjacent region to tell it to close child agents: " + regInfo.RegionName + |
1056 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 1058 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
1057 | //MainLog.Instance.Debug(e.ToString()); | 1059 | //m_log.Debug(e.ToString()); |
1058 | return false; | 1060 | return false; |
1059 | } | 1061 | } |
1060 | 1062 | ||
1061 | catch (SocketException e) | 1063 | catch (SocketException e) |
1062 | { | 1064 | { |
1063 | NoteDeadRegion(regionHandle); | 1065 | NoteDeadRegion(regionHandle); |
1064 | MainLog.Instance.Warn("Socket Error: Unable to connect to adjacent region using tcp://" + | 1066 | m_log.Warn("Socket Error: Unable to connect to adjacent region using tcp://" + |
1065 | regInfo.RemotingAddress + | 1067 | regInfo.RemotingAddress + |
1066 | ":" + regInfo.RemotingPort + | 1068 | ":" + regInfo.RemotingPort + |
1067 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY + | 1069 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY + |
1068 | " - Is this neighbor up?"); | 1070 | " - Is this neighbor up?"); |
1069 | MainLog.Instance.Debug(e.ToString()); | 1071 | m_log.Debug(e.ToString()); |
1070 | return false; | 1072 | return false; |
1071 | } | 1073 | } |
1072 | catch (InvalidCredentialException e) | 1074 | catch (InvalidCredentialException e) |
1073 | { | 1075 | { |
1074 | NoteDeadRegion(regionHandle); | 1076 | NoteDeadRegion(regionHandle); |
1075 | MainLog.Instance.Warn("Invalid Credentials: Unable to connect to adjacent region using tcp://" + | 1077 | m_log.Warn("Invalid Credentials: Unable to connect to adjacent region using tcp://" + |
1076 | regInfo.RemotingAddress + | 1078 | regInfo.RemotingAddress + |
1077 | ":" + regInfo.RemotingPort + | 1079 | ":" + regInfo.RemotingPort + |
1078 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 1080 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
1079 | MainLog.Instance.Debug(e.ToString()); | 1081 | m_log.Debug(e.ToString()); |
1080 | return false; | 1082 | return false; |
1081 | } | 1083 | } |
1082 | catch (AuthenticationException e) | 1084 | catch (AuthenticationException e) |
1083 | { | 1085 | { |
1084 | NoteDeadRegion(regionHandle); | 1086 | NoteDeadRegion(regionHandle); |
1085 | MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region using tcp://" + | 1087 | m_log.Warn("Authentication exception: Unable to connect to adjacent region using tcp://" + |
1086 | regInfo.RemotingAddress + | 1088 | regInfo.RemotingAddress + |
1087 | ":" + regInfo.RemotingPort + | 1089 | ":" + regInfo.RemotingPort + |
1088 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 1090 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
1089 | MainLog.Instance.Debug(e.ToString()); | 1091 | m_log.Debug(e.ToString()); |
1090 | return false; | 1092 | return false; |
1091 | } | 1093 | } |
1092 | catch (WebException e) | 1094 | catch (WebException e) |
1093 | { | 1095 | { |
1094 | NoteDeadRegion(regionHandle); | 1096 | NoteDeadRegion(regionHandle); |
1095 | MainLog.Instance.Warn("WebException exception: Unable to connect to adjacent region using tcp://" + | 1097 | m_log.Warn("WebException exception: Unable to connect to adjacent region using tcp://" + |
1096 | regInfo.RemotingAddress + | 1098 | regInfo.RemotingAddress + |
1097 | ":" + regInfo.RemotingPort + | 1099 | ":" + regInfo.RemotingPort + |
1098 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 1100 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
1099 | MainLog.Instance.Debug(e.ToString()); | 1101 | m_log.Debug(e.ToString()); |
1100 | return false; | 1102 | return false; |
1101 | } | 1103 | } |
1102 | catch (Exception e) | 1104 | catch (Exception e) |
1103 | { | 1105 | { |
1104 | NoteDeadRegion(regionHandle); | 1106 | NoteDeadRegion(regionHandle); |
1105 | // This line errors with a Null Reference Exception.. Why? @.@ | 1107 | // This line errors with a Null Reference Exception.. Why? @.@ |
1106 | //MainLog.Instance.Warn("Unknown exception: Unable to connect to adjacent region using tcp://" + regInfo.RemotingAddress + | 1108 | //m_log.Warn("Unknown exception: Unable to connect to adjacent region using tcp://" + regInfo.RemotingAddress + |
1107 | // ":" + regInfo.RemotingPort + | 1109 | // ":" + regInfo.RemotingPort + |
1108 | //"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY + " - This is likely caused by an incompatibility in the protocol between this sim and that one"); | 1110 | //"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY + " - This is likely caused by an incompatibility in the protocol between this sim and that one"); |
1109 | MainLog.Instance.Debug(e.ToString()); | 1111 | m_log.Debug(e.ToString()); |
1110 | return false; | 1112 | return false; |
1111 | } | 1113 | } |
1112 | } | 1114 | } |
@@ -1133,7 +1135,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1133 | /// <returns></returns> | 1135 | /// <returns></returns> |
1134 | public bool IncomingChildAgent(ulong regionHandle, AgentCircuitData agentData) | 1136 | public bool IncomingChildAgent(ulong regionHandle, AgentCircuitData agentData) |
1135 | { | 1137 | { |
1136 | //MainLog.Instance.Verbose("INTER", gdebugRegionName + ": Incoming OGS1 Agent " + agentData.firstname + " " + agentData.lastname); | 1138 | //m_log.Info("[INTER]: " + gdebugRegionName + ": Incoming OGS1 Agent " + agentData.firstname + " " + agentData.lastname); |
1137 | 1139 | ||
1138 | try | 1140 | try |
1139 | { | 1141 | { |
@@ -1141,16 +1143,16 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1141 | } | 1143 | } |
1142 | catch (RemotingException) | 1144 | catch (RemotingException) |
1143 | { | 1145 | { |
1144 | //MainLog.Instance.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString()); | 1146 | //m_log.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString()); |
1145 | return false; | 1147 | return false; |
1146 | } | 1148 | } |
1147 | } | 1149 | } |
1148 | 1150 | ||
1149 | public bool TriggerRegionUp(SearializableRegionInfo regionData, ulong regionhandle) | 1151 | public bool TriggerRegionUp(SearializableRegionInfo regionData, ulong regionhandle) |
1150 | { | 1152 | { |
1151 | MainLog.Instance.Verbose("INTER", | 1153 | m_log.Info("[INTER]: " + |
1152 | gdebugRegionName + "Incoming OGS1 RegionUpReport: " + "(" + regionData.RegionLocX + | 1154 | gdebugRegionName + "Incoming OGS1 RegionUpReport: " + "(" + regionData.RegionLocX + |
1153 | "," + regionData.RegionLocY + "). Giving this region a fresh set of 'dead' tries"); | 1155 | "," + regionData.RegionLocY + "). Giving this region a fresh set of 'dead' tries"); |
1154 | 1156 | ||
1155 | try | 1157 | try |
1156 | { | 1158 | { |
@@ -1169,14 +1171,14 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1169 | 1171 | ||
1170 | catch (RemotingException e) | 1172 | catch (RemotingException e) |
1171 | { | 1173 | { |
1172 | MainLog.Instance.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString()); | 1174 | m_log.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString()); |
1173 | return false; | 1175 | return false; |
1174 | } | 1176 | } |
1175 | } | 1177 | } |
1176 | 1178 | ||
1177 | public bool TriggerChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData) | 1179 | public bool TriggerChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData) |
1178 | { | 1180 | { |
1179 | //MainLog.Instance.Verbose("INTER", "Incoming OGS1 Child Agent Data Update"); | 1181 | //m_log.Info("[INTER]: Incoming OGS1 Child Agent Data Update"); |
1180 | 1182 | ||
1181 | try | 1183 | try |
1182 | { | 1184 | { |
@@ -1184,7 +1186,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1184 | } | 1186 | } |
1185 | catch (RemotingException e) | 1187 | catch (RemotingException e) |
1186 | { | 1188 | { |
1187 | MainLog.Instance.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString()); | 1189 | m_log.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString()); |
1188 | return false; | 1190 | return false; |
1189 | } | 1191 | } |
1190 | } | 1192 | } |
@@ -1206,7 +1208,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1206 | } | 1208 | } |
1207 | catch (RemotingException e) | 1209 | catch (RemotingException e) |
1208 | { | 1210 | { |
1209 | MainLog.Instance.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString()); | 1211 | m_log.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString()); |
1210 | return false; | 1212 | return false; |
1211 | } | 1213 | } |
1212 | } | 1214 | } |
@@ -1226,7 +1228,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1226 | } | 1228 | } |
1227 | catch (RemotingException e) | 1229 | catch (RemotingException e) |
1228 | { | 1230 | { |
1229 | MainLog.Instance.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString()); | 1231 | m_log.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString()); |
1230 | return false; | 1232 | return false; |
1231 | } | 1233 | } |
1232 | } | 1234 | } |
@@ -1239,7 +1241,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1239 | } | 1241 | } |
1240 | catch (RemotingException e) | 1242 | catch (RemotingException e) |
1241 | { | 1243 | { |
1242 | MainLog.Instance.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString()); | 1244 | m_log.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString()); |
1243 | return false; | 1245 | return false; |
1244 | } | 1246 | } |
1245 | } | 1247 | } |
@@ -1252,7 +1254,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1252 | } | 1254 | } |
1253 | catch (RemotingException) | 1255 | catch (RemotingException) |
1254 | { | 1256 | { |
1255 | MainLog.Instance.Verbose("INTERREGION", "Remoting Error: Unable to connect to neighbour to tell it to close a child connection"); | 1257 | m_log.Info("[INTERREGION]: Remoting Error: Unable to connect to neighbour to tell it to close a child connection"); |
1256 | return false; | 1258 | return false; |
1257 | } | 1259 | } |
1258 | 1260 | ||
diff --git a/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs index b39e0b7..217bb81 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs | |||
@@ -141,6 +141,8 @@ namespace OpenSim.Region.Communications.OGS1 | |||
141 | 141 | ||
142 | public class OGS1InterRegionRemoting : MarshalByRefObject | 142 | public class OGS1InterRegionRemoting : MarshalByRefObject |
143 | { | 143 | { |
144 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
145 | |||
144 | public OGS1InterRegionRemoting() | 146 | public OGS1InterRegionRemoting() |
145 | { | 147 | { |
146 | } | 148 | } |
@@ -230,18 +232,18 @@ namespace OpenSim.Region.Communications.OGS1 | |||
230 | return false; | 232 | return false; |
231 | } | 233 | } |
232 | } | 234 | } |
235 | |||
233 | public bool TellRegionToCloseChildConnection(ulong regionHandle, Guid agentID) | 236 | public bool TellRegionToCloseChildConnection(ulong regionHandle, Guid agentID) |
234 | { | 237 | { |
235 | try | 238 | try |
236 | { | 239 | { |
237 | return InterRegionSingleton.Instance.TellRegionToCloseChildConnection(regionHandle, new LLUUID(agentID)); | 240 | return InterRegionSingleton.Instance.TellRegionToCloseChildConnection(regionHandle, new LLUUID(agentID)); |
238 | |||
239 | } | 241 | } |
240 | catch (RemotingException) | 242 | catch (RemotingException) |
241 | { | 243 | { |
242 | OpenSim.Framework.Console.MainLog.Instance.Verbose("INTERREGION", "Remoting Error: Unable to connect to remote region: " + regionHandle.ToString()); | 244 | m_log.Info("[INTERREGION]: Remoting Error: Unable to connect to remote region: " + regionHandle.ToString()); |
243 | return false; | 245 | return false; |
244 | } | 246 | } |
245 | } | 247 | } |
246 | } | 248 | } |
247 | } \ No newline at end of file | 249 | } |
diff --git a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs index 1780707..656dd70 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs | |||
@@ -38,6 +38,8 @@ namespace OpenSim.Region.Communications.OGS1 | |||
38 | { | 38 | { |
39 | public class OGS1InventoryService : IInventoryServices | 39 | public class OGS1InventoryService : IInventoryServices |
40 | { | 40 | { |
41 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
42 | |||
41 | private string _inventoryServerUrl; | 43 | private string _inventoryServerUrl; |
42 | private Dictionary<LLUUID, InventoryRequest> m_RequestingInventory = new Dictionary<LLUUID, InventoryRequest>(); | 44 | private Dictionary<LLUUID, InventoryRequest> m_RequestingInventory = new Dictionary<LLUUID, InventoryRequest>(); |
43 | 45 | ||
@@ -71,9 +73,9 @@ namespace OpenSim.Region.Communications.OGS1 | |||
71 | { | 73 | { |
72 | try | 74 | try |
73 | { | 75 | { |
74 | MainLog.Instance.Verbose( | 76 | m_log.Info( |
75 | "INVENTORY", "Requesting inventory from {0}/GetInventory/ for user {1}", | 77 | String.Format("[INVENTORY]: Requesting inventory from {0}/GetInventory/ for user {1}", |
76 | _inventoryServerUrl, userID); | 78 | _inventoryServerUrl, userID)); |
77 | 79 | ||
78 | RestObjectPosterResponse<InventoryCollection> requester | 80 | RestObjectPosterResponse<InventoryCollection> requester |
79 | = new RestObjectPosterResponse<InventoryCollection>(); | 81 | = new RestObjectPosterResponse<InventoryCollection>(); |
@@ -83,7 +85,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
83 | } | 85 | } |
84 | catch (Exception e) | 86 | catch (Exception e) |
85 | { | 87 | { |
86 | MainLog.Instance.Error("INVENTORY", e.ToString()); | 88 | m_log.Error("[INVENTORY]: " + e.ToString()); |
87 | } | 89 | } |
88 | } | 90 | } |
89 | 91 | ||
@@ -96,9 +98,9 @@ namespace OpenSim.Region.Communications.OGS1 | |||
96 | LLUUID userID = response.UserID; | 98 | LLUUID userID = response.UserID; |
97 | if (m_RequestingInventory.ContainsKey(userID)) | 99 | if (m_RequestingInventory.ContainsKey(userID)) |
98 | { | 100 | { |
99 | MainLog.Instance.Verbose("INVENTORY", | 101 | m_log.Info(String.Format("[INVENTORY]: " + |
100 | "Received inventory response for user {0} containing {1} folders and {2} items", | 102 | "Received inventory response for user {0} containing {1} folders and {2} items", |
101 | userID, response.Folders.Count, response.AllItems.Count); | 103 | userID, response.Folders.Count, response.AllItems.Count)); |
102 | 104 | ||
103 | InventoryFolderImpl rootFolder = null; | 105 | InventoryFolderImpl rootFolder = null; |
104 | InventoryRequest request = m_RequestingInventory[userID]; | 106 | InventoryRequest request = m_RequestingInventory[userID]; |
@@ -132,10 +134,10 @@ namespace OpenSim.Region.Communications.OGS1 | |||
132 | } | 134 | } |
133 | else | 135 | else |
134 | { | 136 | { |
135 | MainLog.Instance.Warn( | 137 | m_log.Warn( |
136 | "INVENTORY", | 138 | String.Format("[INVENTORY]: " + |
137 | "Received inventory response for {0} for which we do not have a record of requesting!", | 139 | "Received inventory response for {0} for which we do not have a record of requesting!", |
138 | userID); | 140 | userID)); |
139 | } | 141 | } |
140 | } | 142 | } |
141 | 143 | ||
@@ -198,4 +200,4 @@ namespace OpenSim.Region.Communications.OGS1 | |||
198 | } | 200 | } |
199 | } | 201 | } |
200 | } | 202 | } |
201 | } \ No newline at end of file | 203 | } |
diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs index 70b7e89..9a22d14 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs | |||
@@ -40,6 +40,8 @@ namespace OpenSim.Region.Communications.OGS1 | |||
40 | { | 40 | { |
41 | public class OGS1UserServices : IUserService | 41 | public class OGS1UserServices : IUserService |
42 | { | 42 | { |
43 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
44 | |||
43 | private CommunicationsOGS1 m_parent; | 45 | private CommunicationsOGS1 m_parent; |
44 | 46 | ||
45 | public OGS1UserServices(CommunicationsOGS1 parent) | 47 | public OGS1UserServices(CommunicationsOGS1 parent) |
@@ -51,10 +53,10 @@ namespace OpenSim.Region.Communications.OGS1 | |||
51 | { | 53 | { |
52 | if (data.Contains("error_type")) | 54 | if (data.Contains("error_type")) |
53 | { | 55 | { |
54 | MainLog.Instance.Warn("GRID", | 56 | m_log.Warn("[GRID]: " + |
55 | "Error sent by user server when trying to get user profile: (" + | 57 | "Error sent by user server when trying to get user profile: (" + |
56 | data["error_type"] + | 58 | data["error_type"] + |
57 | "): " + data["error_desc"]); | 59 | "): " + data["error_desc"]); |
58 | return null; | 60 | return null; |
59 | } | 61 | } |
60 | 62 | ||
@@ -104,7 +106,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
104 | } | 106 | } |
105 | else | 107 | else |
106 | { | 108 | { |
107 | MainLog.Instance.Warn("INTERGRID", "Got invalid queryID from userServer"); | 109 | m_log.Warn("[INTERGRID]: Got invalid queryID from userServer"); |
108 | } | 110 | } |
109 | return pickerlist; | 111 | return pickerlist; |
110 | } | 112 | } |
@@ -158,7 +160,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
158 | } | 160 | } |
159 | catch (System.Net.WebException) | 161 | catch (System.Net.WebException) |
160 | { | 162 | { |
161 | MainLog.Instance.Warn("LOGOFF", "Unable to notify grid server of user logoff"); | 163 | m_log.Warn("[LOGOFF]: Unable to notify grid server of user logoff"); |
162 | } | 164 | } |
163 | 165 | ||
164 | 166 | ||
@@ -186,8 +188,8 @@ namespace OpenSim.Region.Communications.OGS1 | |||
186 | } | 188 | } |
187 | catch (WebException e) | 189 | catch (WebException e) |
188 | { | 190 | { |
189 | MainLog.Instance.Warn("Error when trying to fetch Avatar Picker Response: " + | 191 | m_log.Warn("Error when trying to fetch Avatar Picker Response: " + |
190 | e.Message); | 192 | e.Message); |
191 | // Return Empty picker list (no results) | 193 | // Return Empty picker list (no results) |
192 | } | 194 | } |
193 | return pickerlist; | 195 | return pickerlist; |
@@ -209,8 +211,8 @@ namespace OpenSim.Region.Communications.OGS1 | |||
209 | } | 211 | } |
210 | catch (WebException e) | 212 | catch (WebException e) |
211 | { | 213 | { |
212 | MainLog.Instance.Warn("Error when trying to fetch profile data by name from remote user server: " + | 214 | m_log.Warn("Error when trying to fetch profile data by name from remote user server: " + |
213 | e.Message); | 215 | e.Message); |
214 | } | 216 | } |
215 | return null; | 217 | return null; |
216 | } | 218 | } |
@@ -299,24 +301,24 @@ namespace OpenSim.Region.Communications.OGS1 | |||
299 | } | 301 | } |
300 | else | 302 | else |
301 | { | 303 | { |
302 | MainLog.Instance.Warn("GRID", "Unable to add new friend, User Server Reported an issue"); | 304 | m_log.Warn("[GRID]: Unable to add new friend, User Server Reported an issue"); |
303 | } | 305 | } |
304 | } | 306 | } |
305 | else | 307 | else |
306 | { | 308 | { |
307 | MainLog.Instance.Warn("GRID", "Unable to add new friend, UserServer didn't understand me!"); | 309 | m_log.Warn("[GRID]: Unable to add new friend, UserServer didn't understand me!"); |
308 | } | 310 | } |
309 | } | 311 | } |
310 | else | 312 | else |
311 | { | 313 | { |
312 | MainLog.Instance.Warn("GRID", "Unable to add new friend, UserServer didn't understand me!"); | 314 | m_log.Warn("[GRID]: Unable to add new friend, UserServer didn't understand me!"); |
313 | 315 | ||
314 | } | 316 | } |
315 | } | 317 | } |
316 | catch (WebException e) | 318 | catch (WebException e) |
317 | { | 319 | { |
318 | MainLog.Instance.Warn("GRID","Error when trying to AddNewUserFriend: " + | 320 | m_log.Warn("[GRID]: Error when trying to AddNewUserFriend: " + |
319 | e.Message); | 321 | e.Message); |
320 | 322 | ||
321 | } | 323 | } |
322 | 324 | ||
@@ -352,24 +354,24 @@ namespace OpenSim.Region.Communications.OGS1 | |||
352 | } | 354 | } |
353 | else | 355 | else |
354 | { | 356 | { |
355 | MainLog.Instance.Warn("GRID", "Unable to remove friend, User Server Reported an issue"); | 357 | m_log.Warn("[GRID]: Unable to remove friend, User Server Reported an issue"); |
356 | } | 358 | } |
357 | } | 359 | } |
358 | else | 360 | else |
359 | { | 361 | { |
360 | MainLog.Instance.Warn("GRID", "Unable to remove friend, UserServer didn't understand me!"); | 362 | m_log.Warn("[GRID]: Unable to remove friend, UserServer didn't understand me!"); |
361 | } | 363 | } |
362 | } | 364 | } |
363 | else | 365 | else |
364 | { | 366 | { |
365 | MainLog.Instance.Warn("GRID", "Unable to remove friend, UserServer didn't understand me!"); | 367 | m_log.Warn("[GRID]: Unable to remove friend, UserServer didn't understand me!"); |
366 | 368 | ||
367 | } | 369 | } |
368 | } | 370 | } |
369 | catch (WebException e) | 371 | catch (WebException e) |
370 | { | 372 | { |
371 | MainLog.Instance.Warn("GRID", "Error when trying to RemoveUserFriend: " + | 373 | m_log.Warn("[GRID]: Error when trying to RemoveUserFriend: " + |
372 | e.Message); | 374 | e.Message); |
373 | 375 | ||
374 | } | 376 | } |
375 | } | 377 | } |
@@ -404,25 +406,24 @@ namespace OpenSim.Region.Communications.OGS1 | |||
404 | } | 406 | } |
405 | else | 407 | else |
406 | { | 408 | { |
407 | MainLog.Instance.Warn("GRID", "Unable to update_user_friend_perms, User Server Reported an issue"); | 409 | m_log.Warn("[GRID]: Unable to update_user_friend_perms, User Server Reported an issue"); |
408 | } | 410 | } |
409 | } | 411 | } |
410 | else | 412 | else |
411 | { | 413 | { |
412 | MainLog.Instance.Warn("GRID", "Unable to update_user_friend_perms, UserServer didn't understand me!"); | 414 | m_log.Warn("[GRID]: Unable to update_user_friend_perms, UserServer didn't understand me!"); |
413 | } | 415 | } |
414 | } | 416 | } |
415 | else | 417 | else |
416 | { | 418 | { |
417 | MainLog.Instance.Warn("GRID", "Unable to update_user_friend_perms, UserServer didn't understand me!"); | 419 | m_log.Warn("[GRID]: Unable to update_user_friend_perms, UserServer didn't understand me!"); |
418 | 420 | ||
419 | } | 421 | } |
420 | } | 422 | } |
421 | catch (WebException e) | 423 | catch (WebException e) |
422 | { | 424 | { |
423 | MainLog.Instance.Warn("GRID", "Error when trying to update_user_friend_perms: " + | 425 | m_log.Warn("[GRID]: Error when trying to update_user_friend_perms: " + |
424 | e.Message); | 426 | e.Message); |
425 | |||
426 | } | 427 | } |
427 | } | 428 | } |
428 | /// <summary> | 429 | /// <summary> |
@@ -452,14 +453,13 @@ namespace OpenSim.Region.Communications.OGS1 | |||
452 | } | 453 | } |
453 | catch (WebException e) | 454 | catch (WebException e) |
454 | { | 455 | { |
455 | MainLog.Instance.Warn("Error when trying to fetch Avatar's friends list: " + | 456 | m_log.Warn("Error when trying to fetch Avatar's friends list: " + |
456 | e.Message); | 457 | e.Message); |
457 | // Return Empty list (no friends) | 458 | // Return Empty list (no friends) |
458 | } | 459 | } |
459 | return buddylist; | 460 | return buddylist; |
460 | |||
461 | } | 461 | } |
462 | 462 | ||
463 | #endregion | 463 | #endregion |
464 | } | 464 | } |
465 | } \ No newline at end of file | 465 | } |
diff --git a/OpenSim/Region/Environment/EstateManager.cs b/OpenSim/Region/Environment/EstateManager.cs index edc86e5..860bd93 100644 --- a/OpenSim/Region/Environment/EstateManager.cs +++ b/OpenSim/Region/Environment/EstateManager.cs | |||
@@ -41,6 +41,8 @@ namespace OpenSim.Region.Environment | |||
41 | /// </summary> | 41 | /// </summary> |
42 | public class EstateManager | 42 | public class EstateManager |
43 | { | 43 | { |
44 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
45 | |||
44 | private Scene m_scene; | 46 | private Scene m_scene; |
45 | private RegionInfo m_regInfo; | 47 | private RegionInfo m_regInfo; |
46 | 48 | ||
@@ -156,7 +158,7 @@ namespace OpenSim.Region.Environment | |||
156 | { | 158 | { |
157 | case "getinfo": | 159 | case "getinfo": |
158 | 160 | ||
159 | //MainLog.Instance.Verbose("ESTATE","CLIENT--->" + packet.ToString()); | 161 | //m_log.Info("[ESTATE]: CLIENT--->" + packet.ToString()); |
160 | sendRegionInfoPacketToAll(); | 162 | sendRegionInfoPacketToAll(); |
161 | if (m_scene.PermissionsMngr.GenericEstatePermission(remote_client.AgentId)) | 163 | if (m_scene.PermissionsMngr.GenericEstatePermission(remote_client.AgentId)) |
162 | { | 164 | { |
@@ -223,7 +225,7 @@ namespace OpenSim.Region.Environment | |||
223 | } | 225 | } |
224 | break; | 226 | break; |
225 | default: | 227 | default: |
226 | MainLog.Instance.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString()); | 228 | m_log.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString()); |
227 | break; | 229 | break; |
228 | } | 230 | } |
229 | } | 231 | } |
@@ -283,7 +285,7 @@ namespace OpenSim.Region.Environment | |||
283 | returnblock[8].Parameter = Helpers.StringToField("1"); | 285 | returnblock[8].Parameter = Helpers.StringToField("1"); |
284 | 286 | ||
285 | packet.ParamList = returnblock; | 287 | packet.ParamList = returnblock; |
286 | //MainLog.Instance.Verbose("ESTATE", "SIM--->" + packet.ToString()); | 288 | //m_log.Info("[ESTATE]: SIM--->" + packet.ToString()); |
287 | remote_client.OutPacket(packet, ThrottleOutPacketType.Task); | 289 | remote_client.OutPacket(packet, ThrottleOutPacketType.Task); |
288 | 290 | ||
289 | sendEstateManagerList(remote_client, packet); | 291 | sendEstateManagerList(remote_client, packet); |
@@ -322,7 +324,7 @@ namespace OpenSim.Region.Environment | |||
322 | returnblock[j].Parameter = EstateManagers[i].GetBytes(); j++; | 324 | returnblock[j].Parameter = EstateManagers[i].GetBytes(); j++; |
323 | } | 325 | } |
324 | packet.ParamList = returnblock; | 326 | packet.ParamList = returnblock; |
325 | //MainLog.Instance.Verbose("ESTATE", "SIM--->" + packet.ToString()); | 327 | //m_log.Info("[ESTATE]: SIM--->" + packet.ToString()); |
326 | remote_client.OutPacket(packet, ThrottleOutPacketType.Task); | 328 | remote_client.OutPacket(packet, ThrottleOutPacketType.Task); |
327 | } | 329 | } |
328 | 330 | ||
@@ -364,10 +366,10 @@ namespace OpenSim.Region.Environment | |||
364 | 366 | ||
365 | default: | 367 | default: |
366 | 368 | ||
367 | MainLog.Instance.Error("EstateOwnerMessage: Unknown EstateAccessType requested in estateAccessDelta\n" + packet.ToString()); | 369 | m_log.Error("EstateOwnerMessage: Unknown EstateAccessType requested in estateAccessDelta\n" + packet.ToString()); |
368 | break; | 370 | break; |
369 | } | 371 | } |
370 | //MainLog.Instance.Error("EstateOwnerMessage: estateAccessDelta\n" + packet.ToString()); | 372 | //m_log.Error("EstateOwnerMessage: estateAccessDelta\n" + packet.ToString()); |
371 | 373 | ||
372 | 374 | ||
373 | } | 375 | } |
@@ -375,7 +377,7 @@ namespace OpenSim.Region.Environment | |||
375 | { | 377 | { |
376 | if (packet.ParamList.Length != 9) | 378 | if (packet.ParamList.Length != 9) |
377 | { | 379 | { |
378 | MainLog.Instance.Error("EstateOwnerMessage: SetRegionInfo method has a ParamList of invalid length"); | 380 | m_log.Error("EstateOwnerMessage: SetRegionInfo method has a ParamList of invalid length"); |
379 | } | 381 | } |
380 | else | 382 | else |
381 | { | 383 | { |
@@ -438,7 +440,7 @@ namespace OpenSim.Region.Environment | |||
438 | { | 440 | { |
439 | if (packet.ParamList.Length != 9) | 441 | if (packet.ParamList.Length != 9) |
440 | { | 442 | { |
441 | MainLog.Instance.Error("EstateOwnerMessage: SetRegionTerrain method has a ParamList of invalid length"); | 443 | m_log.Error("EstateOwnerMessage: SetRegionTerrain method has a ParamList of invalid length"); |
442 | } | 444 | } |
443 | else | 445 | else |
444 | { | 446 | { |
@@ -463,7 +465,7 @@ namespace OpenSim.Region.Environment | |||
463 | } | 465 | } |
464 | catch (Exception ex) | 466 | catch (Exception ex) |
465 | { | 467 | { |
466 | MainLog.Instance.Error("EstateManager: Exception while setting terrain settings: \n" + packet.ToString() + "\n" + ex.ToString()); | 468 | m_log.Error("EstateManager: Exception while setting terrain settings: \n" + packet.ToString() + "\n" + ex.ToString()); |
467 | } | 469 | } |
468 | } | 470 | } |
469 | } | 471 | } |
diff --git a/OpenSim/Region/Environment/LandManagement/LandManager.cs b/OpenSim/Region/Environment/LandManagement/LandManager.cs index c0c1b73..09fa09b 100644 --- a/OpenSim/Region/Environment/LandManagement/LandManager.cs +++ b/OpenSim/Region/Environment/LandManagement/LandManager.cs | |||
@@ -25,6 +25,7 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | |||
28 | using System; | 29 | using System; |
29 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
30 | using Axiom.Math; | 31 | using Axiom.Math; |
@@ -38,7 +39,6 @@ using OpenSim.Region.Physics.Manager; | |||
38 | 39 | ||
39 | namespace OpenSim.Region.Environment.LandManagement | 40 | namespace OpenSim.Region.Environment.LandManagement |
40 | { | 41 | { |
41 | |||
42 | #region LandManager Class | 42 | #region LandManager Class |
43 | 43 | ||
44 | /// <summary> | 44 | /// <summary> |
@@ -46,6 +46,8 @@ namespace OpenSim.Region.Environment.LandManagement | |||
46 | /// </summary> | 46 | /// </summary> |
47 | public class LandManager | 47 | public class LandManager |
48 | { | 48 | { |
49 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
50 | |||
49 | #region Constants | 51 | #region Constants |
50 | 52 | ||
51 | //Land types set with flags in ParcelOverlay. | 53 | //Land types set with flags in ParcelOverlay. |
@@ -57,7 +59,6 @@ namespace OpenSim.Region.Environment.LandManagement | |||
57 | public const byte LAND_TYPE_IS_FOR_SALE = (byte) 4; //Equals 00000100 | 59 | public const byte LAND_TYPE_IS_FOR_SALE = (byte) 4; //Equals 00000100 |
58 | public const byte LAND_TYPE_IS_BEING_AUCTIONED = (byte) 5; //Equals 00000101 | 60 | public const byte LAND_TYPE_IS_BEING_AUCTIONED = (byte) 5; //Equals 00000101 |
59 | 61 | ||
60 | |||
61 | //Flags that when set, a border on the given side will be placed | 62 | //Flags that when set, a border on the given side will be placed |
62 | //NOTE: North and East is assumable by the west and south sides (if land to east has a west border, then I have an east border; etc) | 63 | //NOTE: North and East is assumable by the west and south sides (if land to east has a west border, then I have an east border; etc) |
63 | //This took forever to figure out -- jeesh. /blame LL for even having to send these | 64 | //This took forever to figure out -- jeesh. /blame LL for even having to send these |
@@ -73,7 +74,6 @@ namespace OpenSim.Region.Environment.LandManagement | |||
73 | public const int LAND_SELECT_OBJECTS_GROUP = 4; | 74 | public const int LAND_SELECT_OBJECTS_GROUP = 4; |
74 | public const int LAND_SELECT_OBJECTS_OTHER = 8; | 75 | public const int LAND_SELECT_OBJECTS_OTHER = 8; |
75 | 76 | ||
76 | |||
77 | //These are other constants. Yay! | 77 | //These are other constants. Yay! |
78 | public const int START_LAND_LOCAL_ID = 1; | 78 | public const int START_LAND_LOCAL_ID = 1; |
79 | 79 | ||
@@ -127,7 +127,7 @@ namespace OpenSim.Region.Environment.LandManagement | |||
127 | //} | 127 | //} |
128 | //catch (Exception ex) | 128 | //catch (Exception ex) |
129 | //{ | 129 | //{ |
130 | //MainLog.Instance.Error("LandManager", "IncomingLandObjectsFromStorage: Exception: " + ex.ToString()); | 130 | //m_log.Error("[LandManager]: IncomingLandObjectsFromStorage: Exception: " + ex.ToString()); |
131 | //throw ex; | 131 | //throw ex; |
132 | //} | 132 | //} |
133 | } | 133 | } |
@@ -526,8 +526,7 @@ namespace OpenSim.Region.Environment.LandManagement | |||
526 | } | 526 | } |
527 | catch (Exception e) | 527 | catch (Exception e) |
528 | { | 528 | { |
529 | MainLog.Instance.Debug("LAND", | 529 | m_log.Debug("[LAND]: Skipped Land checks because avatar is out of bounds: " + e.Message); |
530 | "Skipped Land checks because avatar is out of bounds: " + e.Message); | ||
531 | } | 530 | } |
532 | } | 531 | } |
533 | } | 532 | } |
diff --git a/OpenSim/Region/Environment/ModuleLoader.cs b/OpenSim/Region/Environment/ModuleLoader.cs index 76ba14b..d4031d9 100644 --- a/OpenSim/Region/Environment/ModuleLoader.cs +++ b/OpenSim/Region/Environment/ModuleLoader.cs | |||
@@ -40,16 +40,16 @@ namespace OpenSim.Region.Environment | |||
40 | { | 40 | { |
41 | public class ModuleLoader | 41 | public class ModuleLoader |
42 | { | 42 | { |
43 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
44 | |||
43 | public Dictionary<string, Assembly> LoadedAssemblys = new Dictionary<string, Assembly>(); | 45 | public Dictionary<string, Assembly> LoadedAssemblys = new Dictionary<string, Assembly>(); |
44 | 46 | ||
45 | private readonly List<IRegionModule> m_loadedModules = new List<IRegionModule>(); | 47 | private readonly List<IRegionModule> m_loadedModules = new List<IRegionModule>(); |
46 | private readonly Dictionary<string, IRegionModule> m_loadedSharedModules = new Dictionary<string, IRegionModule>(); | 48 | private readonly Dictionary<string, IRegionModule> m_loadedSharedModules = new Dictionary<string, IRegionModule>(); |
47 | private readonly LogBase m_log; | ||
48 | private readonly IConfigSource m_config; | 49 | private readonly IConfigSource m_config; |
49 | 50 | ||
50 | public ModuleLoader(LogBase log, IConfigSource config) | 51 | public ModuleLoader(IConfigSource config) |
51 | { | 52 | { |
52 | m_log = log; | ||
53 | m_config = config; | 53 | m_config = config; |
54 | } | 54 | } |
55 | 55 | ||
@@ -78,7 +78,7 @@ namespace OpenSim.Region.Environment | |||
78 | DynamicTextureModule dynamicModule = new DynamicTextureModule(); | 78 | DynamicTextureModule dynamicModule = new DynamicTextureModule(); |
79 | if (m_loadedSharedModules.ContainsKey(dynamicModule.Name)) | 79 | if (m_loadedSharedModules.ContainsKey(dynamicModule.Name)) |
80 | { | 80 | { |
81 | m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", dynamicModule.Name, "DynamicTextureModule"); | 81 | m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", dynamicModule.Name, "DynamicTextureModule")); |
82 | } | 82 | } |
83 | else | 83 | else |
84 | { | 84 | { |
@@ -88,7 +88,7 @@ namespace OpenSim.Region.Environment | |||
88 | ChatModule chat = new ChatModule(); | 88 | ChatModule chat = new ChatModule(); |
89 | if (m_loadedSharedModules.ContainsKey(chat.Name)) | 89 | if (m_loadedSharedModules.ContainsKey(chat.Name)) |
90 | { | 90 | { |
91 | m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", chat.Name, "ChatModule"); | 91 | m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", chat.Name, "ChatModule")); |
92 | } | 92 | } |
93 | else | 93 | else |
94 | { | 94 | { |
@@ -98,7 +98,7 @@ namespace OpenSim.Region.Environment | |||
98 | InstantMessageModule imMod = new InstantMessageModule(); | 98 | InstantMessageModule imMod = new InstantMessageModule(); |
99 | if (m_loadedSharedModules.ContainsKey(imMod.Name)) | 99 | if (m_loadedSharedModules.ContainsKey(imMod.Name)) |
100 | { | 100 | { |
101 | m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", imMod.Name, "InstantMessageModule"); | 101 | m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", imMod.Name, "InstantMessageModule")); |
102 | } | 102 | } |
103 | else | 103 | else |
104 | { | 104 | { |
@@ -108,7 +108,7 @@ namespace OpenSim.Region.Environment | |||
108 | LoadImageURLModule loadMod = new LoadImageURLModule(); | 108 | LoadImageURLModule loadMod = new LoadImageURLModule(); |
109 | if (m_loadedSharedModules.ContainsKey(loadMod.Name)) | 109 | if (m_loadedSharedModules.ContainsKey(loadMod.Name)) |
110 | { | 110 | { |
111 | m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", loadMod.Name, "LoadImageURLModule"); | 111 | m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", loadMod.Name, "LoadImageURLModule")); |
112 | } | 112 | } |
113 | else | 113 | else |
114 | { | 114 | { |
@@ -118,7 +118,7 @@ namespace OpenSim.Region.Environment | |||
118 | AvatarFactoryModule avatarFactory = new AvatarFactoryModule(); | 118 | AvatarFactoryModule avatarFactory = new AvatarFactoryModule(); |
119 | if (m_loadedSharedModules.ContainsKey(avatarFactory.Name)) | 119 | if (m_loadedSharedModules.ContainsKey(avatarFactory.Name)) |
120 | { | 120 | { |
121 | m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", avatarFactory.Name, "AvarFactoryModule"); | 121 | m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", avatarFactory.Name, "AvarFactoryModule")); |
122 | } | 122 | } |
123 | else | 123 | else |
124 | { | 124 | { |
@@ -128,7 +128,7 @@ namespace OpenSim.Region.Environment | |||
128 | XMLRPCModule xmlRpcMod = new XMLRPCModule(); | 128 | XMLRPCModule xmlRpcMod = new XMLRPCModule(); |
129 | if (m_loadedSharedModules.ContainsKey(xmlRpcMod.Name)) | 129 | if (m_loadedSharedModules.ContainsKey(xmlRpcMod.Name)) |
130 | { | 130 | { |
131 | m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", xmlRpcMod.Name, "XMLRPCModule"); | 131 | m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", xmlRpcMod.Name, "XMLRPCModule")); |
132 | } | 132 | } |
133 | else | 133 | else |
134 | { | 134 | { |
@@ -186,17 +186,17 @@ namespace OpenSim.Region.Environment | |||
186 | 186 | ||
187 | if (modules.Length > 0) | 187 | if (modules.Length > 0) |
188 | { | 188 | { |
189 | m_log.Verbose("MODULES", "Found Module Library [{0}]", dllName); | 189 | m_log.Info(String.Format("[MODULES]: Found Module Library [{0}]", dllName)); |
190 | foreach (IRegionModule module in modules) | 190 | foreach (IRegionModule module in modules) |
191 | { | 191 | { |
192 | if (!module.IsSharedModule) | 192 | if (!module.IsSharedModule) |
193 | { | 193 | { |
194 | m_log.Verbose("MODULES", " [{0}]: Initializing.", module.Name); | 194 | m_log.Info(String.Format("[MODULES]: [{0}]: Initializing.", module.Name)); |
195 | InitializeModule(module, scene); | 195 | InitializeModule(module, scene); |
196 | } | 196 | } |
197 | else | 197 | else |
198 | { | 198 | { |
199 | m_log.Verbose("MODULES", " [{0}]: Loading Shared Module.", module.Name); | 199 | m_log.Info(String.Format("[MODULES]: [{0}]: Loading Shared Module.", module.Name)); |
200 | LoadSharedModule(module); | 200 | LoadSharedModule(module); |
201 | } | 201 | } |
202 | } | 202 | } |
@@ -246,7 +246,7 @@ namespace OpenSim.Region.Environment | |||
246 | } | 246 | } |
247 | catch (BadImageFormatException) | 247 | catch (BadImageFormatException) |
248 | { | 248 | { |
249 | //m_log.Verbose("MODULES", "The file [{0}] is not a module assembly.", e.FileName); | 249 | //m_log.Info(String.Format("[MODULES]: The file [{0}] is not a module assembly.", e.FileName)); |
250 | } | 250 | } |
251 | } | 251 | } |
252 | 252 | ||
@@ -270,7 +270,7 @@ namespace OpenSim.Region.Environment | |||
270 | } | 270 | } |
271 | catch (ReflectionTypeLoadException) | 271 | catch (ReflectionTypeLoadException) |
272 | { | 272 | { |
273 | m_log.Verbose("MODULES", "Could not load types for [{0}].", pluginAssembly.FullName); | 273 | m_log.Info(String.Format("[MODULES]: Could not load types for [{0}].", pluginAssembly.FullName)); |
274 | } | 274 | } |
275 | } | 275 | } |
276 | 276 | ||
diff --git a/OpenSim/Region/Environment/Modules/BetaGridLikeMoneyModule.cs b/OpenSim/Region/Environment/Modules/BetaGridLikeMoneyModule.cs index 81478a1..d51936b 100644 --- a/OpenSim/Region/Environment/Modules/BetaGridLikeMoneyModule.cs +++ b/OpenSim/Region/Environment/Modules/BetaGridLikeMoneyModule.cs | |||
@@ -41,8 +41,7 @@ namespace OpenSim.Region.Environment.Modules | |||
41 | { | 41 | { |
42 | public class BetaGridLikeMoneyModule: IRegionModule | 42 | public class BetaGridLikeMoneyModule: IRegionModule |
43 | { | 43 | { |
44 | 44 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | |
45 | private LogBase m_log; | ||
46 | 45 | ||
47 | private Dictionary<ulong,Scene> m_scenel = new Dictionary<ulong,Scene>(); | 46 | private Dictionary<ulong,Scene> m_scenel = new Dictionary<ulong,Scene>(); |
48 | 47 | ||
@@ -66,8 +65,6 @@ namespace OpenSim.Region.Environment.Modules | |||
66 | 65 | ||
67 | public void Initialise(Scene scene, IConfigSource config) | 66 | public void Initialise(Scene scene, IConfigSource config) |
68 | { | 67 | { |
69 | m_log = MainLog.Instance; | ||
70 | |||
71 | m_gConfig = config; | 68 | m_gConfig = config; |
72 | ReadConfigAndPopulate(); | 69 | ReadConfigAndPopulate(); |
73 | 70 | ||
@@ -160,11 +157,8 @@ namespace OpenSim.Region.Environment.Modules | |||
160 | } | 157 | } |
161 | else | 158 | else |
162 | { | 159 | { |
163 | MainLog.Instance.Warn("MONEY", "Potential Fraud Warning, got money transfer request for avatar that isn't in this simulator - Details; Sender:" + e.sender.ToString() + " Reciver: " + e.reciever.ToString() + " Amount: " + e.amount.ToString()); | 160 | m_log.Warn("[MONEY]: Potential Fraud Warning, got money transfer request for avatar that isn't in this simulator - Details; Sender:" + e.sender.ToString() + " Reciver: " + e.reciever.ToString() + " Amount: " + e.amount.ToString()); |
164 | } | 161 | } |
165 | |||
166 | |||
167 | |||
168 | } | 162 | } |
169 | 163 | ||
170 | private bool doMoneyTranfer(LLUUID Sender, LLUUID Receiver, int amount) | 164 | private bool doMoneyTranfer(LLUUID Sender, LLUUID Receiver, int amount) |
diff --git a/OpenSim/Region/Environment/Modules/ChatModule.cs b/OpenSim/Region/Environment/Modules/ChatModule.cs index 749a923..82bd2ec 100644 --- a/OpenSim/Region/Environment/Modules/ChatModule.cs +++ b/OpenSim/Region/Environment/Modules/ChatModule.cs | |||
@@ -43,8 +43,9 @@ namespace OpenSim.Region.Environment.Modules | |||
43 | { | 43 | { |
44 | public class ChatModule : IRegionModule, ISimChat | 44 | public class ChatModule : IRegionModule, ISimChat |
45 | { | 45 | { |
46 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
47 | |||
46 | private List<Scene> m_scenes = new List<Scene>(); | 48 | private List<Scene> m_scenes = new List<Scene>(); |
47 | private LogBase m_log; | ||
48 | 49 | ||
49 | private int m_whisperdistance = 10; | 50 | private int m_whisperdistance = 10; |
50 | private int m_saydistance = 30; | 51 | private int m_saydistance = 30; |
@@ -59,11 +60,6 @@ namespace OpenSim.Region.Environment.Modules | |||
59 | internal object m_syncLogout = new object(); | 60 | internal object m_syncLogout = new object(); |
60 | private Thread m_irc_connector=null; | 61 | private Thread m_irc_connector=null; |
61 | 62 | ||
62 | public ChatModule() | ||
63 | { | ||
64 | m_log = MainLog.Instance; | ||
65 | } | ||
66 | |||
67 | public void Initialise(Scene scene, IConfigSource config) | 63 | public void Initialise(Scene scene, IConfigSource config) |
68 | { | 64 | { |
69 | lock (m_syncInit) | 65 | lock (m_syncInit) |
@@ -159,7 +155,7 @@ namespace OpenSim.Region.Environment.Modules | |||
159 | } | 155 | } |
160 | catch (Exception ex) | 156 | catch (Exception ex) |
161 | { | 157 | { |
162 | m_log.Error("IRC", "NewClient exception trap:" + ex.ToString()); | 158 | m_log.Error("[IRC]: NewClient exception trap:" + ex.ToString()); |
163 | } | 159 | } |
164 | } | 160 | } |
165 | 161 | ||
@@ -180,13 +176,13 @@ namespace OpenSim.Region.Environment.Modules | |||
180 | { | 176 | { |
181 | m_last_leaving_user = clientName; | 177 | m_last_leaving_user = clientName; |
182 | m_irc.PrivMsg(m_irc.Nick, "Sim", "notices " + clientName + " left " + clientRegion); | 178 | m_irc.PrivMsg(m_irc.Nick, "Sim", "notices " + clientName + " left " + clientRegion); |
183 | m_log.Verbose("IRC", "IRC watcher notices " + clientName + " left " + clientRegion); | 179 | m_log.Info("[IRC]: IRC watcher notices " + clientName + " left " + clientRegion); |
184 | } | 180 | } |
185 | } | 181 | } |
186 | } | 182 | } |
187 | catch (Exception ex) | 183 | catch (Exception ex) |
188 | { | 184 | { |
189 | m_log.Error("IRC", "ClientLoggedOut exception trap:" + ex.ToString()); | 185 | m_log.Error("[IRC]: ClientLoggedOut exception trap:" + ex.ToString()); |
190 | } | 186 | } |
191 | } | 187 | } |
192 | 188 | ||
@@ -319,6 +315,8 @@ namespace OpenSim.Region.Environment.Modules | |||
319 | 315 | ||
320 | internal class IRCChatModule | 316 | internal class IRCChatModule |
321 | { | 317 | { |
318 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
319 | |||
322 | private string m_server = null; | 320 | private string m_server = null; |
323 | private uint m_port = 6668; | 321 | private uint m_port = 6668; |
324 | private string m_user = "USER OpenSimBot 8 * :I'm a OpenSim to irc bot"; | 322 | private string m_user = "USER OpenSimBot 8 * :I'm a OpenSim to irc bot"; |
@@ -341,7 +339,6 @@ namespace OpenSim.Region.Environment.Modules | |||
341 | 339 | ||
342 | private List<Scene> m_scenes = null; | 340 | private List<Scene> m_scenes = null; |
343 | private List<Scene> m_last_scenes = null; | 341 | private List<Scene> m_last_scenes = null; |
344 | private LogBase m_log; | ||
345 | 342 | ||
346 | public IRCChatModule(IConfigSource config) | 343 | public IRCChatModule(IConfigSource config) |
347 | { | 344 | { |
@@ -388,9 +385,8 @@ namespace OpenSim.Region.Environment.Modules | |||
388 | } | 385 | } |
389 | catch (Exception) | 386 | catch (Exception) |
390 | { | 387 | { |
391 | MainLog.Instance.Verbose("CHAT", "No IRC config information, skipping IRC bridge configuration"); | 388 | m_log.Info("[CHAT]: No IRC config information, skipping IRC bridge configuration"); |
392 | } | 389 | } |
393 | m_log = MainLog.Instance; | ||
394 | } | 390 | } |
395 | 391 | ||
396 | public bool Connect(List<Scene> scenes) | 392 | public bool Connect(List<Scene> scenes) |
@@ -404,9 +400,9 @@ namespace OpenSim.Region.Environment.Modules | |||
404 | if (m_last_scenes == null) { m_last_scenes = scenes; } | 400 | if (m_last_scenes == null) { m_last_scenes = scenes; } |
405 | 401 | ||
406 | m_tcp = new TcpClient(m_server, (int)m_port); | 402 | m_tcp = new TcpClient(m_server, (int)m_port); |
407 | m_log.Verbose("IRC", "Connecting..."); | 403 | m_log.Info("[IRC]: Connecting..."); |
408 | m_stream = m_tcp.GetStream(); | 404 | m_stream = m_tcp.GetStream(); |
409 | m_log.Verbose("IRC", "Connected to " + m_server); | 405 | m_log.Info("[IRC]: Connected to " + m_server); |
410 | m_reader = new StreamReader(m_stream); | 406 | m_reader = new StreamReader(m_stream); |
411 | m_writer = new StreamWriter(m_stream); | 407 | m_writer = new StreamWriter(m_stream); |
412 | 408 | ||
@@ -422,7 +418,7 @@ namespace OpenSim.Region.Environment.Modules | |||
422 | m_writer.Flush(); | 418 | m_writer.Flush(); |
423 | m_writer.WriteLine("JOIN " + m_channel); | 419 | m_writer.WriteLine("JOIN " + m_channel); |
424 | m_writer.Flush(); | 420 | m_writer.Flush(); |
425 | m_log.Verbose("IRC", "Connection fully established"); | 421 | m_log.Info("[IRC]: Connection fully established"); |
426 | m_connected = true; | 422 | m_connected = true; |
427 | } | 423 | } |
428 | catch (Exception e) | 424 | catch (Exception e) |
@@ -475,16 +471,16 @@ namespace OpenSim.Region.Environment.Modules | |||
475 | m_writer.WriteLine(m_privmsgformat, m_channel, from, region, msg); | 471 | m_writer.WriteLine(m_privmsgformat, m_channel, from, region, msg); |
476 | } | 472 | } |
477 | m_writer.Flush(); | 473 | m_writer.Flush(); |
478 | m_log.Verbose("IRC", "PrivMsg " + from + " in " + region + " :" + msg); | 474 | m_log.Info("[IRC]: PrivMsg " + from + " in " + region + " :" + msg); |
479 | } | 475 | } |
480 | catch (IOException) | 476 | catch (IOException) |
481 | { | 477 | { |
482 | m_log.Error("IRC", "Disconnected from IRC server.(PrivMsg)"); | 478 | m_log.Error("[IRC]: Disconnected from IRC server.(PrivMsg)"); |
483 | Reconnect(); | 479 | Reconnect(); |
484 | } | 480 | } |
485 | catch (Exception ex) | 481 | catch (Exception ex) |
486 | { | 482 | { |
487 | m_log.Error("IRC", "PrivMsg exception trap:" + ex.ToString()); | 483 | m_log.Error("[IRC]: PrivMsg exception trap:" + ex.ToString()); |
488 | } | 484 | } |
489 | } | 485 | } |
490 | 486 | ||
@@ -493,7 +489,7 @@ namespace OpenSim.Region.Environment.Modules | |||
493 | //examines IRC commands and extracts any private messages | 489 | //examines IRC commands and extracts any private messages |
494 | // which will then be reboadcast in the Sim | 490 | // which will then be reboadcast in the Sim |
495 | 491 | ||
496 | m_log.Verbose("IRC", "ExtractMsg: " + input); | 492 | m_log.Info("[IRC]: ExtractMsg: " + input); |
497 | Dictionary<string, string> result = null; | 493 | Dictionary<string, string> result = null; |
498 | //string regex = @":(?<nick>\w*)!~(?<user>\S*) PRIVMSG (?<channel>\S+) :(?<msg>.*)"; | 494 | //string regex = @":(?<nick>\w*)!~(?<user>\S*) PRIVMSG (?<channel>\S+) :(?<msg>.*)"; |
499 | string regex = @":(?<nick>\w*)!(?<user>\S*) PRIVMSG (?<channel>\S+) :(?<msg>.*)"; | 495 | string regex = @":(?<nick>\w*)!(?<user>\S*) PRIVMSG (?<channel>\S+) :(?<msg>.*)"; |
@@ -510,10 +506,10 @@ namespace OpenSim.Region.Environment.Modules | |||
510 | } | 506 | } |
511 | else | 507 | else |
512 | { | 508 | { |
513 | m_log.Verbose("IRC", "Number of matches: " + matches.Count); | 509 | m_log.Info("[IRC]: Number of matches: " + matches.Count); |
514 | if (matches.Count > 0) | 510 | if (matches.Count > 0) |
515 | { | 511 | { |
516 | m_log.Verbose("IRC", "Number of groups: " + matches[0].Groups.Count); | 512 | m_log.Info("[IRC]: Number of groups: " + matches[0].Groups.Count); |
517 | } | 513 | } |
518 | } | 514 | } |
519 | return result; | 515 | return result; |
@@ -536,12 +532,12 @@ namespace OpenSim.Region.Environment.Modules | |||
536 | } | 532 | } |
537 | catch (IOException) | 533 | catch (IOException) |
538 | { | 534 | { |
539 | m_log.Error("IRC", "Disconnected from IRC server.(PingRun)"); | 535 | m_log.Error("[IRC]: Disconnected from IRC server.(PingRun)"); |
540 | Reconnect(); | 536 | Reconnect(); |
541 | } | 537 | } |
542 | catch (Exception ex) | 538 | catch (Exception ex) |
543 | { | 539 | { |
544 | m_log.Error("IRC", "PingRun exception trap:" + ex.ToString() + "\n" + ex.StackTrace); | 540 | m_log.Error("[IRC]: PingRun exception trap:" + ex.ToString() + "\n" + ex.StackTrace); |
545 | } | 541 | } |
546 | } | 542 | } |
547 | } | 543 | } |
@@ -552,29 +548,29 @@ namespace OpenSim.Region.Environment.Modules | |||
552 | LLVector3 pos = new LLVector3(128, 128, 20); | 548 | LLVector3 pos = new LLVector3(128, 128, 20); |
553 | while (true) | 549 | while (true) |
554 | { | 550 | { |
555 | try | 551 | try |
556 | { | ||
557 | while ((m_connected == true) && ((inputLine = m_reader.ReadLine()) != null)) | ||
558 | { | 552 | { |
553 | while ((m_connected == true) && ((inputLine = m_reader.ReadLine()) != null)) | ||
554 | { | ||
559 | // Console.WriteLine(inputLine); | 555 | // Console.WriteLine(inputLine); |
560 | if (inputLine.Contains(m_channel)) | 556 | if (inputLine.Contains(m_channel)) |
561 | { | 557 | { |
562 | Dictionary<string, string> data = ExtractMsg(inputLine); | 558 | Dictionary<string, string> data = ExtractMsg(inputLine); |
563 | // Any chat ??? | 559 | // Any chat ??? |
564 | if (data != null) | 560 | if (data != null) |
565 | { | 561 | { |
566 | foreach (Scene m_scene in m_scenes) | 562 | foreach (Scene m_scene in m_scenes) |
567 | { | 563 | { |
568 | m_scene.ForEachScenePresence(delegate(ScenePresence avatar) | 564 | m_scene.ForEachScenePresence(delegate(ScenePresence avatar) |
565 | { | ||
566 | if (!avatar.IsChildAgent) | ||
569 | { | 567 | { |
570 | if (!avatar.IsChildAgent) | 568 | avatar.ControllingClient.SendChatMessage( |
571 | { | 569 | Helpers.StringToField(data["msg"]), 255, |
572 | avatar.ControllingClient.SendChatMessage( | 570 | pos, data["nick"], |
573 | Helpers.StringToField(data["msg"]), 255, | 571 | LLUUID.Zero); |
574 | pos, data["nick"], | 572 | } |
575 | LLUUID.Zero); | 573 | }); |
576 | } | ||
577 | }); | ||
578 | } | 574 | } |
579 | 575 | ||
580 | 576 | ||
@@ -584,24 +580,24 @@ namespace OpenSim.Region.Environment.Modules | |||
584 | // Was an command from the IRC server | 580 | // Was an command from the IRC server |
585 | ProcessIRCCommand(inputLine); | 581 | ProcessIRCCommand(inputLine); |
586 | } | 582 | } |
587 | } | 583 | } |
588 | else | 584 | else |
589 | { | 585 | { |
590 | // Was an command from the IRC server | 586 | // Was an command from the IRC server |
591 | ProcessIRCCommand(inputLine); | 587 | ProcessIRCCommand(inputLine); |
592 | } | 588 | } |
593 | Thread.Sleep(150); | 589 | Thread.Sleep(150); |
594 | } | ||
595 | } | ||
596 | catch (IOException) | ||
597 | { | ||
598 | m_log.Error("IRC", "ListenerRun IOException. Disconnected from IRC server ??? (ListenerRun)"); | ||
599 | Reconnect(); | ||
600 | } | ||
601 | catch (Exception ex) | ||
602 | { | ||
603 | m_log.Error("IRC", "ListenerRun exception trap:" + ex.ToString()+"\n"+ex.StackTrace); | ||
604 | } | 590 | } |
591 | } | ||
592 | catch (IOException) | ||
593 | { | ||
594 | m_log.Error("[IRC]: ListenerRun IOException. Disconnected from IRC server ??? (ListenerRun)"); | ||
595 | Reconnect(); | ||
596 | } | ||
597 | catch (Exception ex) | ||
598 | { | ||
599 | m_log.Error("[IRC]: ListenerRun exception trap:" + ex.ToString() + "\n" + ex.StackTrace); | ||
600 | } | ||
605 | } | 601 | } |
606 | } | 602 | } |
607 | 603 | ||
@@ -626,27 +622,27 @@ namespace OpenSim.Region.Environment.Modules | |||
626 | } | 622 | } |
627 | catch (Exception ex) // IRC gate should not crash Sim | 623 | catch (Exception ex) // IRC gate should not crash Sim |
628 | { | 624 | { |
629 | m_log.Error("IRC", "BroadcastSim Exception Trap:" + ex.ToString() + "\n" + ex.StackTrace); | 625 | m_log.Error("[IRC]: BroadcastSim Exception Trap:" + ex.ToString() + "\n" + ex.StackTrace); |
630 | 626 | ||
631 | } | 627 | } |
632 | |||
633 | |||
634 | } | 628 | } |
629 | |||
635 | public enum ErrorReplies | 630 | public enum ErrorReplies |
636 | { | 631 | { |
637 | NotRegistered = 451, // ":You have not registered" | 632 | NotRegistered = 451, // ":You have not registered" |
638 | NicknameInUse = 433 // "<nick> :Nickname is already in use" | 633 | NicknameInUse = 433 // "<nick> :Nickname is already in use" |
639 | } | 634 | } |
635 | |||
640 | public enum Replies | 636 | public enum Replies |
641 | { | 637 | { |
642 | MotdStart = 375, // ":- <server> Message of the day - " | 638 | MotdStart = 375, // ":- <server> Message of the day - " |
643 | Motd = 372, // ":- <text>" | 639 | Motd = 372, // ":- <text>" |
644 | EndOfMotd = 376 // ":End of /MOTD command" | 640 | EndOfMotd = 376 // ":End of /MOTD command" |
645 | |||
646 | } | 641 | } |
642 | |||
647 | public void ProcessIRCCommand(string command) | 643 | public void ProcessIRCCommand(string command) |
648 | { | 644 | { |
649 | //m_log.Verbose("IRC", "ProcessIRCCommand:"+command); | 645 | //m_log.Info("[IRC]: ProcessIRCCommand:" + command); |
650 | 646 | ||
651 | string[] commArgs = new string[command.Split(' ').Length]; | 647 | string[] commArgs = new string[command.Split(' ').Length]; |
652 | string c_server = m_server; | 648 | string c_server = m_server; |
@@ -656,6 +652,7 @@ namespace OpenSim.Region.Environment.Modules | |||
656 | { | 652 | { |
657 | commArgs[0] = commArgs[0].Remove(0, 1); | 653 | commArgs[0] = commArgs[0].Remove(0, 1); |
658 | } | 654 | } |
655 | |||
659 | if (commArgs[1] == "002") | 656 | if (commArgs[1] == "002") |
660 | { | 657 | { |
661 | // fetch the correct servername | 658 | // fetch the correct servername |
@@ -668,7 +665,7 @@ namespace OpenSim.Region.Environment.Modules | |||
668 | 665 | ||
669 | if (commArgs[0] == "ERROR") | 666 | if (commArgs[0] == "ERROR") |
670 | { | 667 | { |
671 | m_log.Error("IRC", "IRC SERVER ERROR:" + command); | 668 | m_log.Error("[IRC]: IRC SERVER ERROR:" + command); |
672 | } | 669 | } |
673 | 670 | ||
674 | if (commArgs[0] == "PING") | 671 | if (commArgs[0] == "PING") |
@@ -695,7 +692,7 @@ namespace OpenSim.Region.Environment.Modules | |||
695 | case (int)ErrorReplies.NicknameInUse: | 692 | case (int)ErrorReplies.NicknameInUse: |
696 | // Gen a new name | 693 | // Gen a new name |
697 | m_nick = m_basenick + Util.RandomClass.Next(1, 99); | 694 | m_nick = m_basenick + Util.RandomClass.Next(1, 99); |
698 | m_log.Error("IRC", "IRC SERVER reports NicknameInUse, trying " + m_nick); | 695 | m_log.Error("[IRC]: IRC SERVER reports NicknameInUse, trying " + m_nick); |
699 | // Retry | 696 | // Retry |
700 | m_writer.WriteLine("NICK " + m_nick); | 697 | m_writer.WriteLine("NICK " + m_nick); |
701 | m_writer.Flush(); | 698 | m_writer.Flush(); |
diff --git a/OpenSim/Region/Environment/Modules/FriendsModule.cs b/OpenSim/Region/Environment/Modules/FriendsModule.cs index fec28a8..3c324a4 100644 --- a/OpenSim/Region/Environment/Modules/FriendsModule.cs +++ b/OpenSim/Region/Environment/Modules/FriendsModule.cs | |||
@@ -40,8 +40,7 @@ namespace OpenSim.Region.Environment.Modules | |||
40 | { | 40 | { |
41 | public class FriendsModule : IRegionModule | 41 | public class FriendsModule : IRegionModule |
42 | { | 42 | { |
43 | 43 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | |
44 | private LogBase m_log; | ||
45 | 44 | ||
46 | private Scene m_scene; | 45 | private Scene m_scene; |
47 | 46 | ||
@@ -49,7 +48,6 @@ namespace OpenSim.Region.Environment.Modules | |||
49 | 48 | ||
50 | public void Initialise(Scene scene, IConfigSource config) | 49 | public void Initialise(Scene scene, IConfigSource config) |
51 | { | 50 | { |
52 | m_log = MainLog.Instance; | ||
53 | m_scene = scene; | 51 | m_scene = scene; |
54 | scene.EventManager.OnNewClient += OnNewClient; | 52 | scene.EventManager.OnNewClient += OnNewClient; |
55 | scene.EventManager.OnGridInstantMessageToFriendsModule += OnGridInstantMessage; | 53 | scene.EventManager.OnGridInstantMessageToFriendsModule += OnGridInstantMessage; |
@@ -72,6 +70,7 @@ namespace OpenSim.Region.Environment.Modules | |||
72 | 70 | ||
73 | 71 | ||
74 | } | 72 | } |
73 | |||
75 | private void OnInstantMessage(IClientAPI client,LLUUID fromAgentID, | 74 | private void OnInstantMessage(IClientAPI client,LLUUID fromAgentID, |
76 | LLUUID fromAgentSession, LLUUID toAgentID, | 75 | LLUUID fromAgentSession, LLUUID toAgentID, |
77 | LLUUID imSessionID, uint timestamp, string fromAgentName, | 76 | LLUUID imSessionID, uint timestamp, string fromAgentName, |
@@ -89,13 +88,13 @@ namespace OpenSim.Region.Environment.Modules | |||
89 | 88 | ||
90 | m_pendingFriendRequests.Add(friendTransactionID, fromAgentID); | 89 | m_pendingFriendRequests.Add(friendTransactionID, fromAgentID); |
91 | 90 | ||
92 | m_log.Verbose("FRIEND", "38 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" + message); | 91 | m_log.Info("[FRIEND]: 38 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" + message); |
93 | GridInstantMessage msg = new GridInstantMessage(); | 92 | GridInstantMessage msg = new GridInstantMessage(); |
94 | msg.fromAgentID = fromAgentID.UUID; | 93 | msg.fromAgentID = fromAgentID.UUID; |
95 | msg.fromAgentSession = fromAgentSession.UUID; | 94 | msg.fromAgentSession = fromAgentSession.UUID; |
96 | msg.toAgentID = toAgentID.UUID; | 95 | msg.toAgentID = toAgentID.UUID; |
97 | msg.imSessionID = friendTransactionID.UUID; // This is the item we're mucking with here | 96 | msg.imSessionID = friendTransactionID.UUID; // This is the item we're mucking with here |
98 | m_log.Verbose("FRIEND","Filling Session: " + msg.imSessionID.ToString()); | 97 | m_log.Info("[FRIEND]: Filling Session: " + msg.imSessionID.ToString()); |
99 | msg.timestamp = timestamp; | 98 | msg.timestamp = timestamp; |
100 | if (client != null) | 99 | if (client != null) |
101 | { | 100 | { |
@@ -115,20 +114,18 @@ namespace OpenSim.Region.Environment.Modules | |||
115 | msg.binaryBucket = binaryBucket; | 114 | msg.binaryBucket = binaryBucket; |
116 | m_scene.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule); | 115 | m_scene.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule); |
117 | } | 116 | } |
117 | |||
118 | // 39 == Accept Friendship | ||
118 | if (dialog == (byte)39) | 119 | if (dialog == (byte)39) |
119 | { | 120 | { |
120 | m_log.Verbose("FRIEND", "38 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" + message); | 121 | m_log.Info("[FRIEND]: 39 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" + message); |
121 | |||
122 | } | 122 | } |
123 | |||
124 | // 40 == Decline Friendship | ||
123 | if (dialog == (byte)40) | 125 | if (dialog == (byte)40) |
124 | { | 126 | { |
125 | m_log.Verbose("FRIEND", "38 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" + message); | 127 | m_log.Info("[FRIEND]: 40 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" + message); |
126 | } | 128 | } |
127 | |||
128 | // 39 == Accept Friendship | ||
129 | |||
130 | // 40 == Decline Friendship | ||
131 | |||
132 | } | 129 | } |
133 | 130 | ||
134 | private void OnApprovedFriendRequest(IClientAPI client, LLUUID agentID, LLUUID transactionID, List<LLUUID> callingCardFolders) | 131 | private void OnApprovedFriendRequest(IClientAPI client, LLUUID agentID, LLUUID transactionID, List<LLUUID> callingCardFolders) |
@@ -160,6 +157,7 @@ namespace OpenSim.Region.Environment.Modules | |||
160 | // TODO: Inform agent that the friend is online | 157 | // TODO: Inform agent that the friend is online |
161 | } | 158 | } |
162 | } | 159 | } |
160 | |||
163 | private void OnDenyFriendRequest(IClientAPI client, LLUUID agentID, LLUUID transactionID, List<LLUUID> callingCardFolders) | 161 | private void OnDenyFriendRequest(IClientAPI client, LLUUID agentID, LLUUID transactionID, List<LLUUID> callingCardFolders) |
164 | { | 162 | { |
165 | if (m_pendingFriendRequests.ContainsKey(transactionID)) | 163 | if (m_pendingFriendRequests.ContainsKey(transactionID)) |
@@ -184,20 +182,15 @@ namespace OpenSim.Region.Environment.Modules | |||
184 | msg.binaryBucket = new byte[0]; | 182 | msg.binaryBucket = new byte[0]; |
185 | m_scene.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule); | 183 | m_scene.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule); |
186 | m_pendingFriendRequests.Remove(transactionID); | 184 | m_pendingFriendRequests.Remove(transactionID); |
187 | |||
188 | } | 185 | } |
189 | |||
190 | |||
191 | } | 186 | } |
192 | 187 | ||
193 | private void OnTerminateFriendship(IClientAPI client, LLUUID agent, LLUUID exfriendID) | 188 | private void OnTerminateFriendship(IClientAPI client, LLUUID agent, LLUUID exfriendID) |
194 | { | 189 | { |
195 | m_scene.StoreRemoveFriendship(agent, exfriendID); | 190 | m_scene.StoreRemoveFriendship(agent, exfriendID); |
196 | // TODO: Inform the client that the ExFriend is offline | 191 | // TODO: Inform the client that the ExFriend is offline |
197 | |||
198 | } | 192 | } |
199 | 193 | ||
200 | |||
201 | private void OnGridInstantMessage(GridInstantMessage msg) | 194 | private void OnGridInstantMessage(GridInstantMessage msg) |
202 | { | 195 | { |
203 | // Trigger the above event handler | 196 | // Trigger the above event handler |
@@ -206,16 +199,12 @@ namespace OpenSim.Region.Environment.Modules | |||
206 | msg.message, msg.dialog, msg.fromGroup, msg.offline, msg.ParentEstateID, | 199 | msg.message, msg.dialog, msg.fromGroup, msg.offline, msg.ParentEstateID, |
207 | new LLVector3(msg.Position.x, msg.Position.y, msg.Position.z), new LLUUID(msg.RegionID), | 200 | new LLVector3(msg.Position.x, msg.Position.y, msg.Position.z), new LLUUID(msg.RegionID), |
208 | msg.binaryBucket); | 201 | msg.binaryBucket); |
209 | |||
210 | } | 202 | } |
211 | 203 | ||
212 | |||
213 | public void PostInitialise() | 204 | public void PostInitialise() |
214 | { | 205 | { |
215 | } | 206 | } |
216 | 207 | ||
217 | |||
218 | |||
219 | public void Close() | 208 | public void Close() |
220 | { | 209 | { |
221 | } | 210 | } |
@@ -230,4 +219,4 @@ namespace OpenSim.Region.Environment.Modules | |||
230 | get { return false; } | 219 | get { return false; } |
231 | } | 220 | } |
232 | } | 221 | } |
233 | } \ No newline at end of file | 222 | } |
diff --git a/OpenSim/Region/Environment/Modules/InstantMessageModule.cs b/OpenSim/Region/Environment/Modules/InstantMessageModule.cs index f5eb052..e0b3138 100644 --- a/OpenSim/Region/Environment/Modules/InstantMessageModule.cs +++ b/OpenSim/Region/Environment/Modules/InstantMessageModule.cs | |||
@@ -39,12 +39,6 @@ namespace OpenSim.Region.Environment.Modules | |||
39 | public class InstantMessageModule : IRegionModule | 39 | public class InstantMessageModule : IRegionModule |
40 | { | 40 | { |
41 | private List<Scene> m_scenes = new List<Scene>(); | 41 | private List<Scene> m_scenes = new List<Scene>(); |
42 | private LogBase m_log; | ||
43 | |||
44 | public InstantMessageModule() | ||
45 | { | ||
46 | m_log = MainLog.Instance; | ||
47 | } | ||
48 | 42 | ||
49 | public void Initialise(Scene scene, IConfigSource config) | 43 | public void Initialise(Scene scene, IConfigSource config) |
50 | { | 44 | { |
@@ -68,7 +62,6 @@ namespace OpenSim.Region.Environment.Modules | |||
68 | uint ParentEstateID, LLVector3 Position, LLUUID RegionID, | 62 | uint ParentEstateID, LLVector3 Position, LLUUID RegionID, |
69 | byte[] binaryBucket) | 63 | byte[] binaryBucket) |
70 | { | 64 | { |
71 | |||
72 | bool FriendDialog = ((dialog == (byte)38) || (dialog == (byte)39) || (dialog == (byte)40)); | 65 | bool FriendDialog = ((dialog == (byte)38) || (dialog == (byte)39) || (dialog == (byte)40)); |
73 | 66 | ||
74 | // IM dialogs need to be pre-processed and have their sessionID filled by the server | 67 | // IM dialogs need to be pre-processed and have their sessionID filled by the server |
diff --git a/OpenSim/Region/Environment/Modules/SunModule.cs b/OpenSim/Region/Environment/Modules/SunModule.cs index bd6cd63..d2572c0 100644 --- a/OpenSim/Region/Environment/Modules/SunModule.cs +++ b/OpenSim/Region/Environment/Modules/SunModule.cs | |||
@@ -39,6 +39,8 @@ namespace OpenSim.Region.Environment.Modules | |||
39 | { | 39 | { |
40 | public class SunModule : IRegionModule | 40 | public class SunModule : IRegionModule |
41 | { | 41 | { |
42 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
43 | |||
42 | private const double m_real_day = 24.0; | 44 | private const double m_real_day = 24.0; |
43 | private const int m_default_frame = 100; | 45 | private const int m_default_frame = 100; |
44 | private int m_frame_mod; | 46 | private int m_frame_mod; |
@@ -48,7 +50,6 @@ namespace OpenSim.Region.Environment.Modules | |||
48 | private long m_start; | 50 | private long m_start; |
49 | 51 | ||
50 | private Scene m_scene; | 52 | private Scene m_scene; |
51 | private LogBase m_log; | ||
52 | 53 | ||
53 | public void Initialise(Scene scene, IConfigSource config) | 54 | public void Initialise(Scene scene, IConfigSource config) |
54 | { | 55 | { |
@@ -69,7 +70,6 @@ namespace OpenSim.Region.Environment.Modules | |||
69 | 70 | ||
70 | m_dilation = (int) (m_real_day/m_day_length); | 71 | m_dilation = (int) (m_real_day/m_day_length); |
71 | m_scene = scene; | 72 | m_scene = scene; |
72 | m_log = MainLog.Instance; | ||
73 | scene.EventManager.OnFrame += SunUpdate; | 73 | scene.EventManager.OnFrame += SunUpdate; |
74 | scene.EventManager.OnNewClient += SunToClient; | 74 | scene.EventManager.OnNewClient += SunToClient; |
75 | } | 75 | } |
@@ -104,7 +104,7 @@ namespace OpenSim.Region.Environment.Modules | |||
104 | m_frame++; | 104 | m_frame++; |
105 | return; | 105 | return; |
106 | } | 106 | } |
107 | // m_log.Verbose("SUN","I've got an update {0} => {1}", m_scene.RegionsInfo.RegionName, HourOfTheDay()); | 107 | // m_log.Info("[SUN]: I've got an update {0} => {1}", m_scene.RegionsInfo.RegionName, HourOfTheDay()); |
108 | List<ScenePresence> avatars = m_scene.GetAvatars(); | 108 | List<ScenePresence> avatars = m_scene.GetAvatars(); |
109 | foreach (ScenePresence avatar in avatars) | 109 | foreach (ScenePresence avatar in avatars) |
110 | { | 110 | { |
@@ -191,4 +191,4 @@ namespace OpenSim.Region.Environment.Modules | |||
191 | // // OutPacket(viewertime); | 191 | // // OutPacket(viewertime); |
192 | // } | 192 | // } |
193 | } | 193 | } |
194 | } \ No newline at end of file | 194 | } |
diff --git a/OpenSim/Region/Environment/Modules/TextureSender.cs b/OpenSim/Region/Environment/Modules/TextureSender.cs index a533078..053a558 100644 --- a/OpenSim/Region/Environment/Modules/TextureSender.cs +++ b/OpenSim/Region/Environment/Modules/TextureSender.cs | |||
@@ -36,6 +36,8 @@ namespace OpenSim.Region.Environment.Modules | |||
36 | { | 36 | { |
37 | public class TextureSender | 37 | public class TextureSender |
38 | { | 38 | { |
39 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
40 | |||
39 | public int counter = 0; | 41 | public int counter = 0; |
40 | private AssetBase m_asset; | 42 | private AssetBase m_asset; |
41 | public long DataPointer = 0; | 43 | public long DataPointer = 0; |
@@ -135,9 +137,8 @@ namespace OpenSim.Region.Environment.Modules | |||
135 | } | 137 | } |
136 | catch (ArgumentOutOfRangeException) | 138 | catch (ArgumentOutOfRangeException) |
137 | { | 139 | { |
138 | MainLog.Instance.Error("TEXTURE", | 140 | m_log.Error("[TEXTURE]: Unable to separate texture into multiple packets: Array bounds failure on asset:" + |
139 | "Unable to separate texture into multiple packets: Array bounds failure on asset:" + | 141 | m_asset.FullID.ToString() ); |
140 | m_asset.FullID.ToString() ); | ||
141 | return; | 142 | return; |
142 | } | 143 | } |
143 | RequestUser.OutPacket(im, ThrottleOutPacketType.Texture); | 144 | RequestUser.OutPacket(im, ThrottleOutPacketType.Texture); |
diff --git a/OpenSim/Region/Environment/Modules/XMLRPCModule.cs b/OpenSim/Region/Environment/Modules/XMLRPCModule.cs index 76c6a53..762e76d 100644 --- a/OpenSim/Region/Environment/Modules/XMLRPCModule.cs +++ b/OpenSim/Region/Environment/Modules/XMLRPCModule.cs | |||
@@ -75,6 +75,8 @@ namespace OpenSim.Region.Environment.Modules | |||
75 | { | 75 | { |
76 | public class XMLRPCModule : IRegionModule, IXMLRPC | 76 | public class XMLRPCModule : IRegionModule, IXMLRPC |
77 | { | 77 | { |
78 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
79 | |||
78 | private Scene m_scene; | 80 | private Scene m_scene; |
79 | private Queue<RPCRequestInfo> rpcQueue = new Queue<RPCRequestInfo>(); | 81 | private Queue<RPCRequestInfo> rpcQueue = new Queue<RPCRequestInfo>(); |
80 | private object XMLRPCListLock = new object(); | 82 | private object XMLRPCListLock = new object(); |
@@ -83,7 +85,6 @@ namespace OpenSim.Region.Environment.Modules | |||
83 | private int RemoteReplyScriptTimeout = 900; | 85 | private int RemoteReplyScriptTimeout = 900; |
84 | private int m_remoteDataPort = 0; | 86 | private int m_remoteDataPort = 0; |
85 | private List<Scene> m_scenes = new List<Scene>(); | 87 | private List<Scene> m_scenes = new List<Scene>(); |
86 | private LogBase m_log; | ||
87 | 88 | ||
88 | // <channel id, RPCChannelInfo> | 89 | // <channel id, RPCChannelInfo> |
89 | private Dictionary<LLUUID, RPCChannelInfo> m_openChannels; | 90 | private Dictionary<LLUUID, RPCChannelInfo> m_openChannels; |
@@ -91,11 +92,6 @@ namespace OpenSim.Region.Environment.Modules | |||
91 | // <channel id, RPCRequestInfo> | 92 | // <channel id, RPCRequestInfo> |
92 | private Dictionary<LLUUID, RPCRequestInfo> m_pendingResponse; | 93 | private Dictionary<LLUUID, RPCRequestInfo> m_pendingResponse; |
93 | 94 | ||
94 | public XMLRPCModule() | ||
95 | { | ||
96 | m_log = MainLog.Instance; | ||
97 | } | ||
98 | |||
99 | public void Initialise(Scene scene, IConfigSource config) | 95 | public void Initialise(Scene scene, IConfigSource config) |
100 | { | 96 | { |
101 | try | 97 | try |
@@ -123,8 +119,8 @@ namespace OpenSim.Region.Environment.Modules | |||
123 | 119 | ||
124 | // Start http server | 120 | // Start http server |
125 | // Attach xmlrpc handlers | 121 | // Attach xmlrpc handlers |
126 | m_log.Verbose("REMOTE_DATA", | 122 | m_log.Info("[REMOTE_DATA]: " + |
127 | "Starting XMLRPC Server on port " + m_remoteDataPort + " for llRemoteData commands."); | 123 | "Starting XMLRPC Server on port " + m_remoteDataPort + " for llRemoteData commands."); |
128 | BaseHttpServer httpServer = new BaseHttpServer((uint) m_remoteDataPort); | 124 | BaseHttpServer httpServer = new BaseHttpServer((uint) m_remoteDataPort); |
129 | httpServer.AddXmlRPCHandler("llRemoteData", XmlRpcRemoteData); | 125 | httpServer.AddXmlRPCHandler("llRemoteData", XmlRpcRemoteData); |
130 | httpServer.Start(); | 126 | httpServer.Start(); |
@@ -413,4 +409,4 @@ namespace OpenSim.Region.Environment.Modules | |||
413 | return m_localID; | 409 | return m_localID; |
414 | } | 410 | } |
415 | } | 411 | } |
416 | } \ No newline at end of file | 412 | } |
diff --git a/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs b/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs index 18a87cb..daaa319 100644 --- a/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs +++ b/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs | |||
@@ -35,6 +35,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
35 | { | 35 | { |
36 | public class AvatarAnimations | 36 | public class AvatarAnimations |
37 | { | 37 | { |
38 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
39 | |||
38 | public Dictionary<string, LLUUID> AnimsLLUUID = new Dictionary<string, LLUUID>(); | 40 | public Dictionary<string, LLUUID> AnimsLLUUID = new Dictionary<string, LLUUID>(); |
39 | public Dictionary<LLUUID, string> AnimsNames = new Dictionary<LLUUID, string>(); | 41 | public Dictionary<LLUUID, string> AnimsNames = new Dictionary<LLUUID, string>(); |
40 | 42 | ||
@@ -44,7 +46,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
44 | 46 | ||
45 | public void LoadAnims() | 47 | public void LoadAnims() |
46 | { | 48 | { |
47 | //MainLog.Instance.Verbose("CLIENT", "Loading avatar animations"); | 49 | //m_log.Info("[CLIENT]: Loading avatar animations"); |
48 | using (XmlTextReader reader = new XmlTextReader("data/avataranimations.xml")) | 50 | using (XmlTextReader reader = new XmlTextReader("data/avataranimations.xml")) |
49 | { | 51 | { |
50 | XmlDocument doc = new XmlDocument(); | 52 | XmlDocument doc = new XmlDocument(); |
@@ -58,7 +60,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
58 | } | 60 | } |
59 | } | 61 | } |
60 | 62 | ||
61 | // MainLog.Instance.Verbose("CLIENT", "Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)"); | 63 | // m_log.Info("[CLIENT]: Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)"); |
62 | 64 | ||
63 | try | 65 | try |
64 | { | 66 | { |
@@ -70,7 +72,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
70 | } | 72 | } |
71 | catch (InvalidOperationException) | 73 | catch (InvalidOperationException) |
72 | { | 74 | { |
73 | MainLog.Instance.Warn("AVATAR", "Unable to load animation names for an Avatar"); | 75 | m_log.Warn("[AVATAR]: Unable to load animation names for an Avatar"); |
74 | } | 76 | } |
75 | } | 77 | } |
76 | } | 78 | } |
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index 6c0ed28..49aeaf9 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs | |||
@@ -42,6 +42,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
42 | 42 | ||
43 | public class InnerScene | 43 | public class InnerScene |
44 | { | 44 | { |
45 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
46 | |||
45 | #region Events | 47 | #region Events |
46 | 48 | ||
47 | public event PhysicsCrash UnRecoverableError; | 49 | public event PhysicsCrash UnRecoverableError; |
@@ -227,13 +229,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
227 | if (child) | 229 | if (child) |
228 | { | 230 | { |
229 | m_numChildAgents++; | 231 | m_numChildAgents++; |
230 | MainLog.Instance.Verbose("SCENE", m_regInfo.RegionName + ": Creating new child agent."); | 232 | m_log.Info("[SCENE]: " + m_regInfo.RegionName + ": Creating new child agent."); |
231 | } | 233 | } |
232 | else | 234 | else |
233 | { | 235 | { |
234 | m_numRootAgents++; | 236 | m_numRootAgents++; |
235 | MainLog.Instance.Verbose("SCENE", m_regInfo.RegionName + ": Creating new root agent."); | 237 | m_log.Info("[SCENE]: " + m_regInfo.RegionName + ": Creating new root agent."); |
236 | MainLog.Instance.Verbose("SCENE", m_regInfo.RegionName + ": Adding Physical agent."); | 238 | m_log.Info("[SCENE]: " + m_regInfo.RegionName + ": Adding Physical agent."); |
237 | 239 | ||
238 | newAvatar.AddToPhysicalScene(); | 240 | newAvatar.AddToPhysicalScene(); |
239 | } | 241 | } |
@@ -542,7 +544,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
542 | LLVector3 oLoc = ((SceneObjectGroup)ent).AbsolutePosition; | 544 | LLVector3 oLoc = ((SceneObjectGroup)ent).AbsolutePosition; |
543 | float distResult = (float)Util.GetDistanceTo(presence.AbsolutePosition,oLoc); | 545 | float distResult = (float)Util.GetDistanceTo(presence.AbsolutePosition,oLoc); |
544 | 546 | ||
545 | //MainLog.Instance.Verbose("DISTANCE", distResult.ToString()); | 547 | //m_log.Info("[DISTANCE]: " + distResult.ToString()); |
546 | 548 | ||
547 | if (distResult > 60) | 549 | if (distResult > 60) |
548 | { | 550 | { |
@@ -897,9 +899,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
897 | } | 899 | } |
898 | else | 900 | else |
899 | { | 901 | { |
900 | MainLog.Instance.Verbose("SCENE", | 902 | m_log.Info(String.Format("[SCENE]: " + |
901 | "DelinkObjects(): Could not find a root prim out of {0} as given to a delink request!", | 903 | "DelinkObjects(): Could not find a root prim out of {0} as given to a delink request!", |
902 | primIds); | 904 | primIds)); |
903 | } | 905 | } |
904 | } | 906 | } |
905 | 907 | ||
@@ -947,7 +949,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
947 | } | 949 | } |
948 | else | 950 | else |
949 | { | 951 | { |
950 | MainLog.Instance.Warn("SCENE", "Attempted to duplicate nonexistant prim id {0}", GroupID); | 952 | m_log.Warn(String.Format("[SCENE]: Attempted to duplicate nonexistant prim id {0}", GroupID)); |
951 | } | 953 | } |
952 | } | 954 | } |
953 | 955 | ||
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 81783f8..28760fd 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | ||
29 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
30 | using libsecondlife; | 31 | using libsecondlife; |
31 | using libsecondlife.Packets; | 32 | using libsecondlife.Packets; |
@@ -37,12 +38,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
37 | { | 38 | { |
38 | public partial class Scene | 39 | public partial class Scene |
39 | { | 40 | { |
41 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
42 | |||
40 | /// <summary> | 43 | /// <summary> |
41 | /// Start all the scripts in the scene which should be started. | 44 | /// Start all the scripts in the scene which should be started. |
42 | /// </summary> | 45 | /// </summary> |
43 | public void StartScripts() | 46 | public void StartScripts() |
44 | { | 47 | { |
45 | MainLog.Instance.Verbose("PRIMINVENTORY", "Starting scripts in scene"); | 48 | m_log.Info("[PRIMINVENTORY]: Starting scripts in scene"); |
46 | 49 | ||
47 | foreach (SceneObjectGroup group in Entities.Values) | 50 | foreach (SceneObjectGroup group in Entities.Values) |
48 | { | 51 | { |
@@ -80,8 +83,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
80 | 83 | ||
81 | if (!TryGetAvatar(avatarId, out avatar)) | 84 | if (!TryGetAvatar(avatarId, out avatar)) |
82 | { | 85 | { |
83 | MainLog.Instance.Error( | 86 | m_log.Error(String.Format( |
84 | "AGENTINVENTORY", "Could not find avatar {0} to add inventory item", avatarId); | 87 | "[AGENTINVENTORY]: Could not find avatar {0} to add inventory item", avatarId)); |
85 | return; | 88 | return; |
86 | } | 89 | } |
87 | 90 | ||
@@ -143,10 +146,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
143 | } | 146 | } |
144 | else | 147 | else |
145 | { | 148 | { |
146 | MainLog.Instance.Error( | 149 | m_log.Error(String.Format( |
147 | "AGENTINVENTORY", | 150 | "[AGENTINVENTORY]: " + |
148 | "Avatar {0} cannot be found to update its inventory item asset", | 151 | "Avatar {0} cannot be found to update its inventory item asset", |
149 | avatarId); | 152 | avatarId)); |
150 | } | 153 | } |
151 | 154 | ||
152 | return LLUUID.Zero; | 155 | return LLUUID.Zero; |
@@ -168,10 +171,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
168 | SceneObjectGroup group = part.ParentGroup; | 171 | SceneObjectGroup group = part.ParentGroup; |
169 | if (null == group) | 172 | if (null == group) |
170 | { | 173 | { |
171 | MainLog.Instance.Error( | 174 | m_log.Error(String.Format( |
172 | "PRIMINVENTORY", | 175 | "[PRIMINVENTORY]: " + |
173 | "Prim inventory update requested for item ID {0} in prim ID {1} but this prim does not exist", | 176 | "Prim inventory update requested for item ID {0} in prim ID {1} but this prim does not exist", |
174 | itemId, primId); | 177 | itemId, primId)); |
175 | 178 | ||
176 | return; | 179 | return; |
177 | } | 180 | } |
@@ -217,10 +220,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
217 | } | 220 | } |
218 | else | 221 | else |
219 | { | 222 | { |
220 | MainLog.Instance.Error( | 223 | m_log.Error(String.Format( |
221 | "PRIMINVENTORY", | 224 | "[PRIMINVENTORY]: " + |
222 | "Avatar {0} cannot be found to update its prim item asset", | 225 | "Avatar {0} cannot be found to update its prim item asset", |
223 | avatarId); | 226 | avatarId)); |
224 | } | 227 | } |
225 | } | 228 | } |
226 | 229 | ||
@@ -289,16 +292,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
289 | } | 292 | } |
290 | else | 293 | else |
291 | { | 294 | { |
292 | MainLog.Instance.Error( | 295 | m_log.Error( |
293 | "AGENTINVENTORY", | 296 | "[AGENTINVENTORY]: Item ID " + itemID + " not found for an inventory item update."); |
294 | "Item ID " + itemID + " not found for an inventory item update."); | ||
295 | } | 297 | } |
296 | } | 298 | } |
297 | else | 299 | else |
298 | { | 300 | { |
299 | MainLog.Instance.Error( | 301 | m_log.Error( |
300 | "AGENTINVENTORY", | 302 | "[AGENTINVENTORY]: Agent ID " + remoteClient.AgentId + " not found for an inventory item update."); |
301 | "Agent ID " + remoteClient.AgentId + " not found for an inventory item update."); | ||
302 | } | 303 | } |
303 | } | 304 | } |
304 | 305 | ||
@@ -311,7 +312,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
311 | CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(oldAgentID); | 312 | CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(oldAgentID); |
312 | if (userInfo == null) | 313 | if (userInfo == null) |
313 | { | 314 | { |
314 | MainLog.Instance.Error("AGENTINVENTORY", "Failed to find user " + oldAgentID.ToString()); | 315 | m_log.Error("[AGENTINVENTORY]: Failed to find user " + oldAgentID.ToString()); |
315 | return; | 316 | return; |
316 | } | 317 | } |
317 | 318 | ||
@@ -320,13 +321,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
320 | item = userInfo.RootFolder.HasItem(oldItemID); | 321 | item = userInfo.RootFolder.HasItem(oldItemID); |
321 | if (item == null) | 322 | if (item == null) |
322 | { | 323 | { |
323 | MainLog.Instance.Error("AGENTINVENTORY", "Failed to find item " + oldItemID.ToString()); | 324 | m_log.Error("[AGENTINVENTORY]: Failed to find item " + oldItemID.ToString()); |
324 | return; | 325 | return; |
325 | } | 326 | } |
326 | } | 327 | } |
327 | else | 328 | else |
328 | { | 329 | { |
329 | MainLog.Instance.Error("AGENTINVENTORY", "Failed to find item " + oldItemID.ToString()); | 330 | m_log.Error("[AGENTINVENTORY]: Failed to find item " + oldItemID.ToString()); |
330 | return; | 331 | return; |
331 | } | 332 | } |
332 | } | 333 | } |
@@ -335,7 +336,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
335 | AssetBase asset = AssetCache.CopyAsset(item.assetID); | 336 | AssetBase asset = AssetCache.CopyAsset(item.assetID); |
336 | if (asset == null) | 337 | if (asset == null) |
337 | { | 338 | { |
338 | MainLog.Instance.Warn("AGENTINVENTORY", "Failed to find asset " + item.assetID.ToString()); | 339 | m_log.Warn("[AGENTINVENTORY]: Failed to find asset " + item.assetID.ToString()); |
339 | return; | 340 | return; |
340 | } | 341 | } |
341 | 342 | ||
@@ -360,14 +361,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
360 | public void MoveInventoryItem(IClientAPI remoteClient, LLUUID folderID, LLUUID itemID, int length, | 361 | public void MoveInventoryItem(IClientAPI remoteClient, LLUUID folderID, LLUUID itemID, int length, |
361 | string newName) | 362 | string newName) |
362 | { | 363 | { |
363 | MainLog.Instance.Verbose( | 364 | m_log.Info( |
364 | "AGENTINVENTORY", | 365 | "[AGENTINVENTORY]: " + |
365 | "Moving item for " + remoteClient.AgentId.ToString()); | 366 | "Moving item for " + remoteClient.AgentId.ToString()); |
366 | 367 | ||
367 | CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); | 368 | CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); |
368 | if (userInfo == null) | 369 | if (userInfo == null) |
369 | { | 370 | { |
370 | MainLog.Instance.Error("AGENTINVENTORY", "Failed to find user " + remoteClient.AgentId.ToString()); | 371 | m_log.Error("[AGENTINVENTORY]: Failed to find user " + remoteClient.AgentId.ToString()); |
371 | return; | 372 | return; |
372 | } | 373 | } |
373 | 374 | ||
@@ -388,13 +389,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
388 | } | 389 | } |
389 | else | 390 | else |
390 | { | 391 | { |
391 | MainLog.Instance.Error("AGENTINVENTORY", "Failed to find item " + itemID.ToString()); | 392 | m_log.Error("[AGENTINVENTORY]: Failed to find item " + itemID.ToString()); |
392 | return; | 393 | return; |
393 | } | 394 | } |
394 | } | 395 | } |
395 | else | 396 | else |
396 | { | 397 | { |
397 | MainLog.Instance.Error("AGENTINVENTORY", "Failed to find item " + itemID.ToString() + ", no root folder"); | 398 | m_log.Error("[AGENTINVENTORY]: Failed to find item " + itemID.ToString() + ", no root folder"); |
398 | return; | 399 | return; |
399 | } | 400 | } |
400 | } | 401 | } |
@@ -497,8 +498,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
497 | } | 498 | } |
498 | else | 499 | else |
499 | { | 500 | { |
500 | MainLog.Instance.Error( | 501 | m_log.Error(String.Format( |
501 | "PRIMINVENTORY", "Inventory requested of prim {0} which doesn't exist", primLocalID); | 502 | "[PRIMINVENTORY]: Inventory requested of prim {0} which doesn't exist", primLocalID)); |
502 | } | 503 | } |
503 | } | 504 | } |
504 | 505 | ||
@@ -523,11 +524,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
523 | } | 524 | } |
524 | else | 525 | else |
525 | { | 526 | { |
526 | MainLog.Instance.Error( | 527 | m_log.Error(String.Format( |
527 | "PRIMINVENTORY", | 528 | "[PRIMINVENTORY]: " + |
528 | "Removal of item {0} requested of prim {1} but this prim does not exist", | 529 | "Removal of item {0} requested of prim {1} but this prim does not exist", |
529 | itemID, | 530 | itemID, |
530 | localID); | 531 | localID)); |
531 | } | 532 | } |
532 | } | 533 | } |
533 | 534 | ||
@@ -547,18 +548,18 @@ namespace OpenSim.Region.Environment.Scenes | |||
547 | { | 548 | { |
548 | // TODO Retrieve itemID from client's inventory to pass on | 549 | // TODO Retrieve itemID from client's inventory to pass on |
549 | //group.AddInventoryItem(remoteClient, primLocalID, null); | 550 | //group.AddInventoryItem(remoteClient, primLocalID, null); |
550 | MainLog.Instance.Verbose( | 551 | m_log.Info(String.Format( |
551 | "PRIMINVENTORY", | 552 | "[PRIMINVENTORY]: " + |
552 | "Non script prim inventory not yet implemented!" | 553 | "Non script prim inventory not yet implemented!" |
553 | + "\nUpdateTaskInventory called with item {0}, folder {1}, primLocalID {2}, user {3}", | 554 | + "\nUpdateTaskInventory called with item {0}, folder {1}, primLocalID {2}, user {3}", |
554 | itemID, folderID, primLocalID, remoteClient.Name); | 555 | itemID, folderID, primLocalID, remoteClient.Name)); |
555 | } | 556 | } |
556 | else | 557 | else |
557 | { | 558 | { |
558 | MainLog.Instance.Warn( | 559 | m_log.Warn(String.Format( |
559 | "PRIMINVENTORY", | 560 | "[PRIMINVENTORY]: " + |
560 | "Update with item {0} requested of prim {1} for {2} but this prim does not exist", | 561 | "Update with item {0} requested of prim {1} for {2} but this prim does not exist", |
561 | itemID, primLocalID, remoteClient.Name); | 562 | itemID, primLocalID, remoteClient.Name)); |
562 | } | 563 | } |
563 | } | 564 | } |
564 | 565 | ||
@@ -596,25 +597,25 @@ namespace OpenSim.Region.Environment.Scenes | |||
596 | group.StartScript(localID, copyID); | 597 | group.StartScript(localID, copyID); |
597 | group.GetProperites(remoteClient); | 598 | group.GetProperites(remoteClient); |
598 | 599 | ||
599 | // MainLog.Instance.Verbose( | 600 | // m_log.Info( |
600 | // "PRIMINVENTORY", | 601 | // String.Format("[PRIMINVENTORY]: " + |
601 | // "Rezzed script {0} into prim local ID {1} for user {2}", | 602 | // "Rezzed script {0} into prim local ID {1} for user {2}", |
602 | // item.inventoryName, localID, remoteClient.Name); | 603 | // item.inventoryName, localID, remoteClient.Name)); |
603 | } | 604 | } |
604 | else | 605 | else |
605 | { | 606 | { |
606 | MainLog.Instance.Error( | 607 | m_log.Error(String.Format( |
607 | "PRIMINVENTORY", | 608 | "[PRIMINVENTORY]: " + |
608 | "Could not rez script {0} into prim local ID {1} for user {2}" | 609 | "Could not rez script {0} into prim local ID {1} for user {2}" |
609 | + " because the prim could not be found in the region!", | 610 | + " because the prim could not be found in the region!", |
610 | item.inventoryName, localID, remoteClient.Name); | 611 | item.inventoryName, localID, remoteClient.Name)); |
611 | } | 612 | } |
612 | } | 613 | } |
613 | else | 614 | else |
614 | { | 615 | { |
615 | MainLog.Instance.Error( | 616 | m_log.Error(String.Format( |
616 | "PRIMINVENTORY", "Could not find script inventory item {0} to rez for {1}!", | 617 | "[PRIMINVENTORY]: Could not find script inventory item {0} to rez for {1}!", |
617 | itemID, remoteClient.Name); | 618 | itemID, remoteClient.Name)); |
618 | } | 619 | } |
619 | } | 620 | } |
620 | } | 621 | } |
@@ -646,7 +647,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
646 | foreach (DeRezObjectPacket.ObjectDataBlock Data in DeRezPacket.ObjectData) | 647 | foreach (DeRezObjectPacket.ObjectDataBlock Data in DeRezPacket.ObjectData) |
647 | { | 648 | { |
648 | EntityBase selectedEnt = null; | 649 | EntityBase selectedEnt = null; |
649 | //MainLog.Instance.Verbose("CLIENT", "LocalID:" + Data.ObjectLocalID.ToString()); | 650 | //m_log.Info("[CLIENT]: LocalID:" + Data.ObjectLocalID.ToString()); |
650 | 651 | ||
651 | List<EntityBase> EntitieList = GetEntities(); | 652 | List<EntityBase> EntitieList = GetEntities(); |
652 | 653 | ||
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 1d688e3..a724ac0 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -270,12 +270,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
270 | 270 | ||
271 | RegisterDefaultSceneEvents(); | 271 | RegisterDefaultSceneEvents(); |
272 | 272 | ||
273 | MainLog.Instance.Verbose("SCENE", "Creating new entitities instance"); | 273 | m_log.Info("[SCENE]: Creating new entitities instance"); |
274 | Entities = new Dictionary<LLUUID, EntityBase>(); | 274 | Entities = new Dictionary<LLUUID, EntityBase>(); |
275 | m_scenePresences = new Dictionary<LLUUID, ScenePresence>(); | 275 | m_scenePresences = new Dictionary<LLUUID, ScenePresence>(); |
276 | //m_sceneObjects = new Dictionary<LLUUID, SceneObjectGroup>(); | 276 | //m_sceneObjects = new Dictionary<LLUUID, SceneObjectGroup>(); |
277 | 277 | ||
278 | MainLog.Instance.Verbose("SCENE", "Creating LandMap"); | 278 | m_log.Info("[SCENE]: Creating LandMap"); |
279 | Terrain = new TerrainEngine((int) RegionInfo.RegionLocX, (int) RegionInfo.RegionLocY); | 279 | Terrain = new TerrainEngine((int) RegionInfo.RegionLocX, (int) RegionInfo.RegionLocY); |
280 | 280 | ||
281 | ScenePresence.LoadAnims(); | 281 | ScenePresence.LoadAnims(); |
@@ -365,16 +365,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
365 | { | 365 | { |
366 | // This means that we're not booted up completely yet. | 366 | // This means that we're not booted up completely yet. |
367 | // This shouldn't happen too often anymore. | 367 | // This shouldn't happen too often anymore. |
368 | MainLog.Instance.Error("SCENE", | 368 | m_log.Error("[SCENE]: Couldn't inform client of regionup because we got a null reference exception"); |
369 | "Couldn't inform client of regionup because we got a null reference exception"); | ||
370 | } | 369 | } |
371 | } | 370 | } |
372 | else | 371 | else |
373 | { | 372 | { |
374 | MainLog.Instance.Verbose("INTERGRID", | 373 | m_log.Info("[INTERGRID]: Got notice about far away Region: " + otherRegion.RegionName.ToString() + |
375 | "Got notice about far away Region: " + otherRegion.RegionName.ToString() + | 374 | " at (" + otherRegion.RegionLocX.ToString() + ", " + |
376 | " at (" + otherRegion.RegionLocX.ToString() + ", " + | 375 | otherRegion.RegionLocY.ToString() + ")"); |
377 | otherRegion.RegionLocY.ToString() + ")"); | ||
378 | } | 376 | } |
379 | } | 377 | } |
380 | return true; | 378 | return true; |
@@ -402,7 +400,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
402 | m_RestartTimerCounter = 0; | 400 | m_RestartTimerCounter = 0; |
403 | m_restartTimer.AutoReset = true; | 401 | m_restartTimer.AutoReset = true; |
404 | m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed); | 402 | m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed); |
405 | MainLog.Instance.Error("REGION", "Restarting Region in " + (seconds/60) + " minutes"); | 403 | m_log.Error("[REGION]: Restarting Region in " + (seconds/60) + " minutes"); |
406 | m_restartTimer.Start(); | 404 | m_restartTimer.Start(); |
407 | SendRegionMessageFromEstateTools(LLUUID.Random(), LLUUID.Random(), String.Empty, RegionInfo.RegionName + ": Restarting in 2 Minutes"); | 405 | SendRegionMessageFromEstateTools(LLUUID.Random(), LLUUID.Random(), String.Empty, RegionInfo.RegionName + ": Restarting in 2 Minutes"); |
408 | //SendGeneralAlert(RegionInfo.RegionName + ": Restarting in 2 Minutes"); | 406 | //SendGeneralAlert(RegionInfo.RegionName + ": Restarting in 2 Minutes"); |
@@ -436,9 +434,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
436 | // This causes the region to restart immediatley. | 434 | // This causes the region to restart immediatley. |
437 | public void RestartNow() | 435 | public void RestartNow() |
438 | { | 436 | { |
439 | MainLog.Instance.Error("REGION", "Closing"); | 437 | m_log.Error("[REGION]: Closing"); |
440 | Close(); | 438 | Close(); |
441 | MainLog.Instance.Error("REGION", "Firing Region Restart Message"); | 439 | m_log.Error("[REGION]: Firing Region Restart Message"); |
442 | base.Restart(0); | 440 | base.Restart(0); |
443 | } | 441 | } |
444 | 442 | ||
@@ -485,7 +483,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
485 | if (m_scripts_enabled != !ScriptEngine) | 483 | if (m_scripts_enabled != !ScriptEngine) |
486 | { | 484 | { |
487 | // Tedd! Here's the method to disable the scripting engine! | 485 | // Tedd! Here's the method to disable the scripting engine! |
488 | MainLog.Instance.Verbose("TOTEDD", "Here is the method to trigger disabling of the scripting engine"); | 486 | m_log.Info("[TOTEDD]: Here is the method to trigger disabling of the scripting engine"); |
489 | } | 487 | } |
490 | if (m_physics_enabled != !PhysicsEngine) | 488 | if (m_physics_enabled != !PhysicsEngine) |
491 | { | 489 | { |
@@ -498,7 +496,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
498 | // This is the method that shuts down the scene. | 496 | // This is the method that shuts down the scene. |
499 | public override void Close() | 497 | public override void Close() |
500 | { | 498 | { |
501 | MainLog.Instance.Warn("SCENE", "Closing down the single simulator: " + RegionInfo.RegionName); | 499 | m_log.Warn("[SCENE]: Closing down the single simulator: " + RegionInfo.RegionName); |
502 | // Kick all ROOT agents with the message, 'The simulator is going down' | 500 | // Kick all ROOT agents with the message, 'The simulator is going down' |
503 | ForEachScenePresence(delegate(ScenePresence avatar) | 501 | ForEachScenePresence(delegate(ScenePresence avatar) |
504 | { | 502 | { |
@@ -543,7 +541,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
543 | /// </summary> | 541 | /// </summary> |
544 | public void StartTimer() | 542 | public void StartTimer() |
545 | { | 543 | { |
546 | MainLog.Instance.Debug("SCENE", "Starting timer"); | 544 | m_log.Debug("[SCENE]: Starting timer"); |
547 | m_heartbeatTimer.Enabled = true; | 545 | m_heartbeatTimer.Enabled = true; |
548 | m_heartbeatTimer.Interval = (int) (m_timespan*1000); | 546 | m_heartbeatTimer.Interval = (int) (m_timespan*1000); |
549 | m_heartbeatTimer.Elapsed += new ElapsedEventHandler(Heartbeat); | 547 | m_heartbeatTimer.Elapsed += new ElapsedEventHandler(Heartbeat); |
@@ -649,7 +647,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
649 | } | 647 | } |
650 | catch (Exception e) | 648 | catch (Exception e) |
651 | { | 649 | { |
652 | MainLog.Instance.Error("Scene", "Failed with exception " + e.ToString()); | 650 | m_log.Error("[Scene]: Failed with exception " + e.ToString()); |
653 | } | 651 | } |
654 | finally | 652 | finally |
655 | { | 653 | { |
@@ -848,7 +846,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
848 | { | 846 | { |
849 | if (string.IsNullOrEmpty(m_regInfo.EstateSettings.terrainFile)) | 847 | if (string.IsNullOrEmpty(m_regInfo.EstateSettings.terrainFile)) |
850 | { | 848 | { |
851 | MainLog.Instance.Verbose("TERRAIN", "No default terrain. Generating a new terrain."); | 849 | m_log.Info("[TERRAIN]: No default terrain. Generating a new terrain."); |
852 | Terrain.SetDefaultTerrain(); | 850 | Terrain.SetDefaultTerrain(); |
853 | 851 | ||
854 | m_storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD(), RegionInfo.RegionID); | 852 | m_storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD(), RegionInfo.RegionID); |
@@ -862,8 +860,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
862 | } | 860 | } |
863 | catch | 861 | catch |
864 | { | 862 | { |
865 | MainLog.Instance.Verbose("TERRAIN", | 863 | m_log.Info("[TERRAIN]: No terrain found in database or default. Generating a new terrain."); |
866 | "No terrain found in database or default. Generating a new terrain."); | ||
867 | Terrain.SetDefaultTerrain(); | 864 | Terrain.SetDefaultTerrain(); |
868 | } | 865 | } |
869 | m_storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD(), RegionInfo.RegionID); | 866 | m_storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD(), RegionInfo.RegionID); |
@@ -879,7 +876,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
879 | } | 876 | } |
880 | catch (Exception e) | 877 | catch (Exception e) |
881 | { | 878 | { |
882 | MainLog.Instance.Warn("terrain", "Scene.cs: LoadWorldMap() - Failed with exception " + e.ToString()); | 879 | m_log.Warn("[terrain]: Scene.cs: LoadWorldMap() - Failed with exception " + e.ToString()); |
883 | } | 880 | } |
884 | } | 881 | } |
885 | 882 | ||
@@ -894,12 +891,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
894 | { | 891 | { |
895 | if (dGridSettings["allow_forceful_banlines"] != "TRUE") | 892 | if (dGridSettings["allow_forceful_banlines"] != "TRUE") |
896 | { | 893 | { |
897 | MainLog.Instance.Verbose("GRID", "Grid is disabling forceful parcel banlists"); | 894 | m_log.Info("[GRID]: Grid is disabling forceful parcel banlists"); |
898 | m_LandManager.allowedForcefulBans = false; | 895 | m_LandManager.allowedForcefulBans = false; |
899 | } | 896 | } |
900 | else | 897 | else |
901 | { | 898 | { |
902 | MainLog.Instance.Verbose("GRID", "Grid is allowing forceful parcel banlists"); | 899 | m_log.Info("[GRID]: Grid is allowing forceful parcel banlists"); |
903 | m_LandManager.allowedForcefulBans = true; | 900 | m_LandManager.allowedForcefulBans = true; |
904 | } | 901 | } |
905 | } | 902 | } |
@@ -929,7 +926,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
929 | 926 | ||
930 | public void loadAllLandObjectsFromStorage() | 927 | public void loadAllLandObjectsFromStorage() |
931 | { | 928 | { |
932 | MainLog.Instance.Verbose("SCENE", "Loading land objects from storage"); | 929 | m_log.Info("[SCENE]: Loading land objects from storage"); |
933 | List<LandData> landData = m_storageManager.DataStore.LoadLandObjects(RegionInfo.RegionID); | 930 | List<LandData> landData = m_storageManager.DataStore.LoadLandObjects(RegionInfo.RegionID); |
934 | 931 | ||
935 | if (landData.Count == 0) | 932 | if (landData.Count == 0) |
@@ -951,7 +948,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
951 | /// </summary> | 948 | /// </summary> |
952 | public virtual void LoadPrimsFromStorage(bool m_permissions) | 949 | public virtual void LoadPrimsFromStorage(bool m_permissions) |
953 | { | 950 | { |
954 | MainLog.Instance.Verbose("SCENE", "Loading objects from datastore"); | 951 | m_log.Info("[SCENE]: Loading objects from datastore"); |
955 | 952 | ||
956 | List<SceneObjectGroup> PrimsFromDB = m_storageManager.DataStore.LoadObjects(m_regInfo.RegionID); | 953 | List<SceneObjectGroup> PrimsFromDB = m_storageManager.DataStore.LoadObjects(m_regInfo.RegionID); |
957 | foreach (SceneObjectGroup group in PrimsFromDB) | 954 | foreach (SceneObjectGroup group in PrimsFromDB) |
@@ -964,7 +961,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
964 | //rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); | 961 | //rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); |
965 | } | 962 | } |
966 | 963 | ||
967 | MainLog.Instance.Verbose("SCENE", "Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)"); | 964 | m_log.Info("[SCENE]: Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)"); |
968 | } | 965 | } |
969 | 966 | ||
970 | 967 | ||
@@ -999,7 +996,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
999 | { | 996 | { |
1000 | pos = target.AbsolutePosition; | 997 | pos = target.AbsolutePosition; |
1001 | 998 | ||
1002 | //MainLog.Instance.Verbose("RAYTRACE", pos.ToString()); | 999 | //m_log.Info("[RAYTRACE]: " + pos.ToString()); |
1003 | //EntityIntersection rayTracing = null; | 1000 | //EntityIntersection rayTracing = null; |
1004 | //ScenePresence presence = ((ScenePresence)GetScenePresence(ownerID)); | 1001 | //ScenePresence presence = ((ScenePresence)GetScenePresence(ownerID)); |
1005 | //if (presence != null) | 1002 | //if (presence != null) |
@@ -1038,14 +1035,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
1038 | 1035 | ||
1039 | //Vector3 RezPoint = Newpos; | 1036 | //Vector3 RezPoint = Newpos; |
1040 | 1037 | ||
1041 | //MainLog.Instance.Verbose("REZINFO", "Possible Rez Point:" + RezPoint.ToString()); | 1038 | //m_log.Info("[REZINFO]: Possible Rez Point:" + RezPoint.ToString()); |
1042 | //pos = new LLVector3(RezPoint.x, RezPoint.y, RezPoint.z); | 1039 | //pos = new LLVector3(RezPoint.x, RezPoint.y, RezPoint.z); |
1043 | //} | 1040 | //} |
1044 | 1041 | ||
1045 | |||
1046 | |||
1047 | |||
1048 | |||
1049 | return pos; | 1042 | return pos; |
1050 | } | 1043 | } |
1051 | else | 1044 | else |
@@ -1061,18 +1054,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
1061 | pos = RayEnd; | 1054 | pos = RayEnd; |
1062 | return pos; | 1055 | return pos; |
1063 | } | 1056 | } |
1064 | |||
1065 | } | 1057 | } |
1066 | 1058 | ||
1067 | public virtual void AddNewPrim(LLUUID ownerID, LLVector3 RayEnd, LLQuaternion rot, PrimitiveBaseShape shape, | 1059 | public virtual void AddNewPrim(LLUUID ownerID, LLVector3 RayEnd, LLQuaternion rot, PrimitiveBaseShape shape, |
1068 | byte bypassRaycast, LLVector3 RayStart, LLUUID RayTargetID, | 1060 | byte bypassRaycast, LLVector3 RayStart, LLUUID RayTargetID, |
1069 | byte RayEndIsIntersection) | 1061 | byte RayEndIsIntersection) |
1070 | { | 1062 | { |
1071 | LLVector3 pos = GetNewRezLocation(RayStart, RayEnd, RayTargetID, rot, bypassRaycast, RayEndIsIntersection); | 1063 | LLVector3 pos = GetNewRezLocation(RayStart, RayEnd, RayTargetID, rot, bypassRaycast, RayEndIsIntersection); |
1072 | 1064 | ||
1073 | |||
1074 | |||
1075 | |||
1076 | if (PermissionsMngr.CanRezObject(ownerID, pos)) | 1065 | if (PermissionsMngr.CanRezObject(ownerID, pos)) |
1077 | { | 1066 | { |
1078 | // rez ON the ground, not IN the ground | 1067 | // rez ON the ground, not IN the ground |
@@ -1364,7 +1353,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1364 | } | 1353 | } |
1365 | catch (Exception e) | 1354 | catch (Exception e) |
1366 | { | 1355 | { |
1367 | MainLog.Instance.Error("Scene.cs:RemoveClient exception: " + e.ToString()); | 1356 | m_log.Error("Scene.cs:RemoveClient exception: " + e.ToString()); |
1368 | } | 1357 | } |
1369 | 1358 | ||
1370 | // Remove client agent from profile, so new logins will work | 1359 | // Remove client agent from profile, so new logins will work |
@@ -1474,7 +1463,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1474 | 1463 | ||
1475 | if (m_capsHandlers.ContainsKey(agent.AgentID)) | 1464 | if (m_capsHandlers.ContainsKey(agent.AgentID)) |
1476 | { | 1465 | { |
1477 | //MainLog.Instance.Warn("client", "Adding duplicate CAPS entry for user " + | 1466 | //m_log.Warn("[client]: Adding duplicate CAPS entry for user " + |
1478 | // agent.AgentID.ToString()); | 1467 | // agent.AgentID.ToString()); |
1479 | try | 1468 | try |
1480 | { | 1469 | { |
@@ -1514,8 +1503,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1514 | } | 1503 | } |
1515 | catch (Exception e) | 1504 | catch (Exception e) |
1516 | { | 1505 | { |
1517 | MainLog.Instance.Verbose("SCENE", "Unable to do Agent Crossing."); | 1506 | m_log.Info("[SCENE]: Unable to do Agent Crossing."); |
1518 | MainLog.Instance.Debug("SCENE", e.ToString()); | 1507 | m_log.Debug("[SCENE]: " + e.ToString()); |
1519 | } | 1508 | } |
1520 | //m_innerScene.SwapRootChildAgent(false); | 1509 | //m_innerScene.SwapRootChildAgent(false); |
1521 | } | 1510 | } |
@@ -2158,14 +2147,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
2158 | switch (showWhat) | 2147 | switch (showWhat) |
2159 | { | 2148 | { |
2160 | case "users": | 2149 | case "users": |
2161 | MainLog.Instance.Error("Current Region: " + RegionInfo.RegionName); | 2150 | m_log.Error("Current Region: " + RegionInfo.RegionName); |
2162 | MainLog.Instance.Error( | 2151 | m_log.Error( |
2163 | String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16}{5,-16}{6,-16}", "Firstname", "Lastname", | 2152 | String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16}{5,-16}{6,-16}", "Firstname", "Lastname", |
2164 | "Agent ID", "Session ID", "Circuit", "IP", "World")); | 2153 | "Agent ID", "Session ID", "Circuit", "IP", "World")); |
2165 | 2154 | ||
2166 | foreach (ScenePresence scenePrescence in GetAvatars()) | 2155 | foreach (ScenePresence scenePrescence in GetAvatars()) |
2167 | { | 2156 | { |
2168 | MainLog.Instance.Error( | 2157 | m_log.Error( |
2169 | String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16},{5,-16}{6,-16}", | 2158 | String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16},{5,-16}{6,-16}", |
2170 | scenePrescence.Firstname, | 2159 | scenePrescence.Firstname, |
2171 | scenePrescence.Lastname, | 2160 | scenePrescence.Lastname, |
@@ -2177,12 +2166,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
2177 | } | 2166 | } |
2178 | break; | 2167 | break; |
2179 | case "modules": | 2168 | case "modules": |
2180 | MainLog.Instance.Error("The currently loaded modules in " + RegionInfo.RegionName + " are:"); | 2169 | m_log.Error("The currently loaded modules in " + RegionInfo.RegionName + " are:"); |
2181 | foreach (IRegionModule module in Modules.Values) | 2170 | foreach (IRegionModule module in Modules.Values) |
2182 | { | 2171 | { |
2183 | if (!module.IsSharedModule) | 2172 | if (!module.IsSharedModule) |
2184 | { | 2173 | { |
2185 | MainLog.Instance.Error("Region Module: " + module.Name); | 2174 | m_log.Error("Region Module: " + module.Name); |
2186 | } | 2175 | } |
2187 | } | 2176 | } |
2188 | break; | 2177 | break; |
@@ -2250,11 +2239,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
2250 | /// | 2239 | /// |
2251 | /// </summary> | 2240 | /// </summary> |
2252 | /// <param name="scriptEngine"></param> | 2241 | /// <param name="scriptEngine"></param> |
2253 | /// <param name="logger"></param> | 2242 | public void AddScriptEngine(ScriptEngineInterface scriptEngine) |
2254 | public void AddScriptEngine(ScriptEngineInterface scriptEngine, LogBase logger) | ||
2255 | { | 2243 | { |
2256 | ScriptEngines.Add(scriptEngine); | 2244 | ScriptEngines.Add(scriptEngine); |
2257 | scriptEngine.InitializeEngine(this, logger); | 2245 | scriptEngine.InitializeEngine(this); |
2258 | } | 2246 | } |
2259 | 2247 | ||
2260 | public void TriggerObjectChanged(uint localID, uint change) | 2248 | public void TriggerObjectChanged(uint localID, uint change) |
@@ -2372,7 +2360,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2372 | } | 2360 | } |
2373 | catch (Exception e) | 2361 | catch (Exception e) |
2374 | { | 2362 | { |
2375 | MainLog.Instance.Verbose("BUG", e.ToString()); | 2363 | m_log.Info("[BUG]: " + e.ToString()); |
2376 | } | 2364 | } |
2377 | } | 2365 | } |
2378 | } | 2366 | } |
diff --git a/OpenSim/Region/Environment/Scenes/SceneBase.cs b/OpenSim/Region/Environment/Scenes/SceneBase.cs index d4a4bb0..2e95322 100644 --- a/OpenSim/Region/Environment/Scenes/SceneBase.cs +++ b/OpenSim/Region/Environment/Scenes/SceneBase.cs | |||
@@ -36,6 +36,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
36 | { | 36 | { |
37 | public abstract class SceneBase : IScene | 37 | public abstract class SceneBase : IScene |
38 | { | 38 | { |
39 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
40 | |||
39 | #region Events | 41 | #region Events |
40 | 42 | ||
41 | public event restart OnRestart; | 43 | public event restart OnRestart; |
@@ -155,7 +157,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
155 | /// <param name="seconds"></param> | 157 | /// <param name="seconds"></param> |
156 | public virtual void Restart(int seconds) | 158 | public virtual void Restart(int seconds) |
157 | { | 159 | { |
158 | MainLog.Instance.Error("REGION", "passing Restart Message up the namespace"); | 160 | m_log.Error("[REGION]: passing Restart Message up the namespace"); |
159 | OnRestart(RegionInfo); | 161 | OnRestart(RegionInfo); |
160 | } | 162 | } |
161 | 163 | ||
@@ -180,7 +182,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
180 | } | 182 | } |
181 | catch (Exception e) | 183 | catch (Exception e) |
182 | { | 184 | { |
183 | MainLog.Instance.Error("SCENE", "SceneBase.cs: Close() - Failed with exception " + e.ToString()); | 185 | m_log.Error("[SCENE]: SceneBase.cs: Close() - Failed with exception " + e.ToString()); |
184 | } | 186 | } |
185 | } | 187 | } |
186 | 188 | ||
diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs index 2bb36a3..a89b52c 100644 --- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs | |||
@@ -40,6 +40,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
40 | 40 | ||
41 | public class SceneCommunicationService //one instance per region | 41 | public class SceneCommunicationService //one instance per region |
42 | { | 42 | { |
43 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
44 | |||
43 | protected CommunicationsManager m_commsProvider; | 45 | protected CommunicationsManager m_commsProvider; |
44 | protected RegionInfo m_regionInfo; | 46 | protected RegionInfo m_regionInfo; |
45 | 47 | ||
@@ -77,7 +79,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
77 | 79 | ||
78 | if (regionCommsHost != null) | 80 | if (regionCommsHost != null) |
79 | { | 81 | { |
80 | //MainLog.Instance.Verbose("INTER", debugRegionName + ": SceneCommunicationService: registered with gridservice and got" + regionCommsHost.ToString()); | 82 | //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: registered with gridservice and got" + regionCommsHost.ToString()); |
81 | 83 | ||
82 | regionCommsHost.debugRegionName = _debugRegionName; | 84 | regionCommsHost.debugRegionName = _debugRegionName; |
83 | 85 | ||
@@ -91,7 +93,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
91 | } | 93 | } |
92 | else | 94 | else |
93 | { | 95 | { |
94 | //MainLog.Instance.Verbose("INTER", debugRegionName + ": SceneCommunicationService: registered with gridservice and got null"); | 96 | //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: registered with gridservice and got null"); |
95 | } | 97 | } |
96 | } | 98 | } |
97 | 99 | ||
@@ -122,7 +124,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
122 | { | 124 | { |
123 | if (OnExpectUser != null) | 125 | if (OnExpectUser != null) |
124 | { | 126 | { |
125 | //MainLog.Instance.Verbose("INTER", debugRegionName + ": SceneCommunicationService: OnExpectUser Fired for User:" + agent.firstname + " " + agent.lastname); | 127 | //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: OnExpectUser Fired for User:" + agent.firstname + " " + agent.lastname); |
126 | OnExpectUser(regionHandle, agent); | 128 | OnExpectUser(regionHandle, agent); |
127 | } | 129 | } |
128 | } | 130 | } |
@@ -131,7 +133,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
131 | { | 133 | { |
132 | if (OnRegionUp != null) | 134 | if (OnRegionUp != null) |
133 | { | 135 | { |
134 | //MainLog.Instance.Verbose("INTER", debugRegionName + ": SceneCommunicationService: newRegionUp Fired for User:" + region.RegionName); | 136 | //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: newRegionUp Fired for User:" + region.RegionName); |
135 | OnRegionUp(region); | 137 | OnRegionUp(region); |
136 | } | 138 | } |
137 | return true; | 139 | return true; |
@@ -164,7 +166,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
164 | 166 | ||
165 | protected bool CloseConnection(ulong regionHandle, LLUUID agentID) | 167 | protected bool CloseConnection(ulong regionHandle, LLUUID agentID) |
166 | { | 168 | { |
167 | MainLog.Instance.Verbose("INTERREGION", "Incoming Agent Close Request for agent: " + agentID.ToString()); | 169 | m_log.Info("[INTERREGION]: Incoming Agent Close Request for agent: " + agentID.ToString()); |
168 | 170 | ||
169 | if (OnCloseAgentConnection != null) | 171 | if (OnCloseAgentConnection != null) |
170 | { | 172 | { |
@@ -199,14 +201,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
199 | private void InformClientOfNeighbourAsync(ScenePresence avatar, AgentCircuitData a, ulong regionHandle, | 201 | private void InformClientOfNeighbourAsync(ScenePresence avatar, AgentCircuitData a, ulong regionHandle, |
200 | IPEndPoint endPoint) | 202 | IPEndPoint endPoint) |
201 | { | 203 | { |
202 | MainLog.Instance.Notice("INTERGRID", "Starting to inform client about neighbours"); | 204 | m_log.Info("[INTERGRID]: Starting to inform client about neighbours"); |
203 | bool regionAccepted = m_commsProvider.InterRegion.InformRegionOfChildAgent(regionHandle, a); | 205 | bool regionAccepted = m_commsProvider.InterRegion.InformRegionOfChildAgent(regionHandle, a); |
204 | 206 | ||
205 | if (regionAccepted) | 207 | if (regionAccepted) |
206 | { | 208 | { |
207 | avatar.ControllingClient.InformClientOfNeighbour(regionHandle, endPoint); | 209 | avatar.ControllingClient.InformClientOfNeighbour(regionHandle, endPoint); |
208 | avatar.AddNeighbourRegion(regionHandle); | 210 | avatar.AddNeighbourRegion(regionHandle); |
209 | MainLog.Instance.Notice("INTERGRID", "Completed inform client about neighbours"); | 211 | m_log.Info("[INTERGRID]: Completed inform client about neighbours"); |
210 | } | 212 | } |
211 | } | 213 | } |
212 | 214 | ||
@@ -291,17 +293,17 @@ namespace OpenSim.Region.Environment.Scenes | |||
291 | 293 | ||
292 | private void InformNeighboursThatRegionIsUpAsync(RegionInfo region, ulong regionhandle) | 294 | private void InformNeighboursThatRegionIsUpAsync(RegionInfo region, ulong regionhandle) |
293 | { | 295 | { |
294 | MainLog.Instance.Notice("INTERGRID", "Starting to inform neighbors that I'm here"); | 296 | m_log.Info("[INTERGRID]: Starting to inform neighbors that I'm here"); |
295 | bool regionAccepted = | 297 | bool regionAccepted = |
296 | m_commsProvider.InterRegion.RegionUp((new SearializableRegionInfo(region)), regionhandle); | 298 | m_commsProvider.InterRegion.RegionUp((new SearializableRegionInfo(region)), regionhandle); |
297 | 299 | ||
298 | if (regionAccepted) | 300 | if (regionAccepted) |
299 | { | 301 | { |
300 | MainLog.Instance.Notice("INTERGRID", "Completed informing neighbors that I'm here"); | 302 | m_log.Info("[INTERGRID]: Completed informing neighbors that I'm here"); |
301 | } | 303 | } |
302 | else | 304 | else |
303 | { | 305 | { |
304 | MainLog.Instance.Notice("INTERGRID", "Failed to inform neighbors that I'm here"); | 306 | m_log.Info("[INTERGRID]: Failed to inform neighbors that I'm here"); |
305 | } | 307 | } |
306 | } | 308 | } |
307 | 309 | ||
@@ -311,7 +313,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
311 | /// </summary> | 313 | /// </summary> |
312 | public void InformNeighborsThatRegionisUp(RegionInfo region) | 314 | public void InformNeighborsThatRegionisUp(RegionInfo region) |
313 | { | 315 | { |
314 | //MainLog.Instance.Verbose("INTER", debugRegionName + ": SceneCommunicationService: Sending InterRegion Notification that region is up " + region.RegionName); | 316 | //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: Sending InterRegion Notification that region is up " + region.RegionName); |
315 | 317 | ||
316 | 318 | ||
317 | List<SimpleRegionInfo> neighbours = new List<SimpleRegionInfo>(); | 319 | List<SimpleRegionInfo> neighbours = new List<SimpleRegionInfo>(); |
@@ -343,7 +345,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
343 | /// </summary> | 345 | /// </summary> |
344 | private void SendChildAgentDataUpdateAsync(ChildAgentDataUpdate cAgentData, ScenePresence presence) | 346 | private void SendChildAgentDataUpdateAsync(ChildAgentDataUpdate cAgentData, ScenePresence presence) |
345 | { | 347 | { |
346 | //MainLog.Instance.Notice("INTERGRID", "Informing neighbors about my agent."); | 348 | //m_log.Info("[INTERGRID]: Informing neighbors about my agent."); |
347 | try | 349 | try |
348 | { | 350 | { |
349 | foreach (ulong regionHandle in presence.KnownChildRegions) | 351 | foreach (ulong regionHandle in presence.KnownChildRegions) |
@@ -352,11 +354,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
352 | 354 | ||
353 | if (regionAccepted) | 355 | if (regionAccepted) |
354 | { | 356 | { |
355 | //MainLog.Instance.Notice("INTERGRID", "Completed sending a neighbor an update about my agent"); | 357 | //m_log.Info("[INTERGRID]: Completed sending a neighbor an update about my agent"); |
356 | } | 358 | } |
357 | else | 359 | else |
358 | { | 360 | { |
359 | //MainLog.Instance.Notice("INTERGRID", "Failed sending a neighbor an update about my agent"); | 361 | //m_log.Info("[INTERGRID]: Failed sending a neighbor an update about my agent"); |
360 | } | 362 | } |
361 | } | 363 | } |
362 | } | 364 | } |
@@ -397,12 +399,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
397 | 399 | ||
398 | if (regionAccepted) | 400 | if (regionAccepted) |
399 | { | 401 | { |
400 | MainLog.Instance.Notice("INTERGRID", "Completed sending agent Close agent Request to neighbor"); | 402 | m_log.Info("[INTERGRID]: Completed sending agent Close agent Request to neighbor"); |
401 | presence.RemoveNeighbourRegion(regionHandle); | 403 | presence.RemoveNeighbourRegion(regionHandle); |
402 | } | 404 | } |
403 | else | 405 | else |
404 | { | 406 | { |
405 | MainLog.Instance.Notice("INTERGRID", "Failed sending agent Close agent Request to neighbor"); | 407 | m_log.Info("[INTERGRID]: Failed sending agent Close agent Request to neighbor"); |
406 | 408 | ||
407 | } | 409 | } |
408 | 410 | ||
@@ -431,7 +433,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
431 | /// <returns></returns> | 433 | /// <returns></returns> |
432 | public virtual RegionInfo RequestNeighbouringRegionInfo(ulong regionHandle) | 434 | public virtual RegionInfo RequestNeighbouringRegionInfo(ulong regionHandle) |
433 | { | 435 | { |
434 | //MainLog.Instance.Verbose("INTER", debugRegionName + ": SceneCommunicationService: Sending Grid Services Request about neighbor " + regionHandle.ToString()); | 436 | //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: Sending Grid Services Request about neighbor " + regionHandle.ToString()); |
435 | return m_commsProvider.GridService.RequestNeighbourInfo(regionHandle); | 437 | return m_commsProvider.GridService.RequestNeighbourInfo(regionHandle); |
436 | } | 438 | } |
437 | 439 | ||
diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs index 1eac61b..7156428 100644 --- a/OpenSim/Region/Environment/Scenes/SceneManager.cs +++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs | |||
@@ -38,6 +38,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
38 | 38 | ||
39 | public class SceneManager | 39 | public class SceneManager |
40 | { | 40 | { |
41 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
42 | |||
41 | public event RestartSim OnRestartSim; | 43 | public event RestartSim OnRestartSim; |
42 | 44 | ||
43 | private readonly List<Scene> m_localScenes; | 45 | private readonly List<Scene> m_localScenes; |
@@ -98,8 +100,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
98 | 100 | ||
99 | public void HandleRestart(RegionInfo rdata) | 101 | public void HandleRestart(RegionInfo rdata) |
100 | { | 102 | { |
101 | MainLog.Instance.Error("SCENEMANAGER", | 103 | m_log.Error("[SCENEMANAGER]: Got Restart message for region:" + rdata.RegionName + " Sending up to main"); |
102 | "Got Restart message for region:" + rdata.RegionName + " Sending up to main"); | ||
103 | int RegionSceneElement = -1; | 104 | int RegionSceneElement = -1; |
104 | for (int i = 0; i < m_localScenes.Count; i++) | 105 | for (int i = 0; i < m_localScenes.Count; i++) |
105 | { | 106 | { |
@@ -146,7 +147,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
146 | } | 147 | } |
147 | else | 148 | else |
148 | { | 149 | { |
149 | MainLog.Instance.Error("REGION", "Unable to notify Other regions of this Region coming up"); | 150 | m_log.Error("[REGION]: Unable to notify Other regions of this Region coming up"); |
150 | } | 151 | } |
151 | } | 152 | } |
152 | 153 | ||
@@ -285,29 +286,29 @@ namespace OpenSim.Region.Environment.Scenes | |||
285 | return false; | 286 | return false; |
286 | } | 287 | } |
287 | 288 | ||
288 | public void SetDebugPacketOnCurrentScene(LogBase log, int newDebug) | 289 | public void SetDebugPacketOnCurrentScene(int newDebug) |
289 | { | 290 | { |
290 | ForEachCurrentScene(delegate(Scene scene) | 291 | ForEachCurrentScene(delegate(Scene scene) |
291 | { | 292 | { |
292 | List<EntityBase> EntitieList = scene.GetEntities(); | 293 | List<EntityBase> EntitieList = scene.GetEntities(); |
293 | 294 | ||
294 | foreach (EntityBase entity in EntitieList) | 295 | foreach (EntityBase entity in EntitieList) |
296 | { | ||
297 | if (entity is ScenePresence) | ||
295 | { | 298 | { |
296 | if (entity is ScenePresence) | 299 | ScenePresence scenePrescence = entity as ScenePresence; |
300 | if (!scenePrescence.IsChildAgent) | ||
297 | { | 301 | { |
298 | ScenePresence scenePrescence = entity as ScenePresence; | 302 | m_log.Error(String.Format("Packet debug for {0} {1} set to {2}", |
299 | if (!scenePrescence.IsChildAgent) | 303 | scenePrescence.Firstname, |
300 | { | 304 | scenePrescence.Lastname, |
301 | log.Error(String.Format("Packet debug for {0} {1} set to {2}", | 305 | newDebug)); |
302 | scenePrescence.Firstname, | ||
303 | scenePrescence.Lastname, | ||
304 | newDebug)); | ||
305 | 306 | ||
306 | scenePrescence.ControllingClient.SetDebug(newDebug); | 307 | scenePrescence.ControllingClient.SetDebug(newDebug); |
307 | } | ||
308 | } | 308 | } |
309 | } | 309 | } |
310 | }); | 310 | } |
311 | }); | ||
311 | } | 312 | } |
312 | 313 | ||
313 | public List<ScenePresence> GetCurrentSceneAvatars() | 314 | public List<ScenePresence> GetCurrentSceneAvatars() |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs index 1bddf25..0956f74 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs | |||
@@ -38,6 +38,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
38 | { | 38 | { |
39 | public partial class SceneObjectGroup : EntityBase | 39 | public partial class SceneObjectGroup : EntityBase |
40 | { | 40 | { |
41 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
42 | |||
41 | /// <summary> | 43 | /// <summary> |
42 | /// Start a given script. | 44 | /// Start a given script. |
43 | /// </summary> | 45 | /// </summary> |
@@ -53,10 +55,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
53 | } | 55 | } |
54 | else | 56 | else |
55 | { | 57 | { |
56 | MainLog.Instance.Error( | 58 | m_log.Error(String.Format( |
57 | "PRIMINVENTORY", | 59 | "[PRIMINVENTORY]: " + |
58 | "Couldn't find part {0} in object group {1}, {2} to start script with ID {3}", | 60 | "Couldn't find part {0} in object group {1}, {2} to start script with ID {3}", |
59 | localID, Name, UUID, itemID); | 61 | localID, Name, UUID, itemID)); |
60 | } | 62 | } |
61 | } | 63 | } |
62 | 64 | ||
@@ -74,10 +76,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
74 | // } | 76 | // } |
75 | // else | 77 | // else |
76 | // { | 78 | // { |
77 | // MainLog.Instance.Error( | 79 | // m_log.Error(String.Format( |
78 | // "PRIMINVENTORY", | 80 | // "[PRIMINVENTORY]: " + |
79 | // "Couldn't find part {0} in object group {1}, {2} to start script with ID {3}", | 81 | // "Couldn't find part {0} in object group {1}, {2} to start script with ID {3}", |
80 | // localID, Name, UUID, itemID); | 82 | // localID, Name, UUID, itemID)); |
81 | // } | 83 | // } |
82 | // } | 84 | // } |
83 | 85 | ||
@@ -106,10 +108,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
106 | } | 108 | } |
107 | else | 109 | else |
108 | { | 110 | { |
109 | MainLog.Instance.Error( | 111 | m_log.Error(String.Format( |
110 | "PRIMINVENTORY", | 112 | "[PRIMINVENTORY]: " + |
111 | "Couldn't find part {0} in object group {1}, {2} to stop script with ID {3}", | 113 | "Couldn't find part {0} in object group {1}, {2} to stop script with ID {3}", |
112 | partID, Name, UUID, itemID); | 114 | partID, Name, UUID, itemID)); |
113 | } | 115 | } |
114 | } | 116 | } |
115 | 117 | ||
@@ -127,10 +129,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
127 | } | 129 | } |
128 | else | 130 | else |
129 | { | 131 | { |
130 | MainLog.Instance.Error( | 132 | m_log.Error(String.Format( |
131 | "PRIMINVENTORY", | 133 | "[PRIMINVENTORY]: " + |
132 | "Couldn't find part {0} in object group {1}, {2} to retreive prim inventory", | 134 | "Couldn't find part {0} in object group {1}, {2} to retreive prim inventory", |
133 | localID, Name, UUID); | 135 | localID, Name, UUID)); |
134 | } | 136 | } |
135 | return false; | 137 | return false; |
136 | } | 138 | } |
@@ -144,10 +146,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
144 | } | 146 | } |
145 | else | 147 | else |
146 | { | 148 | { |
147 | MainLog.Instance.Error( | 149 | m_log.Error(String.Format( |
148 | "PRIMINVENTORY", | 150 | "[PRIMINVENTORY]: " + |
149 | "Couldn't find part {0} in object group {1}, {2} to request inventory data", | 151 | "Couldn't find part {0} in object group {1}, {2} to request inventory data", |
150 | localID, Name, UUID); | 152 | localID, Name, UUID)); |
151 | } | 153 | } |
152 | } | 154 | } |
153 | 155 | ||
@@ -183,10 +185,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
183 | } | 185 | } |
184 | else | 186 | else |
185 | { | 187 | { |
186 | MainLog.Instance.Error( | 188 | m_log.Error(String.Format( |
187 | "PRIMINVENTORY", | 189 | "[PRIMINVENTORY]: " + |
188 | "Couldn't find prim local ID {0} in group {1}, {2} to add inventory item ID {3}", | 190 | "Couldn't find prim local ID {0} in group {1}, {2} to add inventory item ID {3}", |
189 | localID, Name, UUID, newItemId); | 191 | localID, Name, UUID, newItemId)); |
190 | } | 192 | } |
191 | 193 | ||
192 | return false; | 194 | return false; |
@@ -207,10 +209,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
207 | } | 209 | } |
208 | else | 210 | else |
209 | { | 211 | { |
210 | MainLog.Instance.Error( | 212 | m_log.Error(String.Format( |
211 | "PRIMINVENTORY", | 213 | "[PRIMINVENTORY]: " + |
212 | "Couldn't find prim local ID {0} in prim {1}, {2} to get inventory item ID {3}", | 214 | "Couldn't find prim local ID {0} in prim {1}, {2} to get inventory item ID {3}", |
213 | primID, part.Name, part.UUID, itemID); | 215 | primID, part.Name, part.UUID, itemID)); |
214 | } | 216 | } |
215 | 217 | ||
216 | return null; | 218 | return null; |
@@ -233,10 +235,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
233 | } | 235 | } |
234 | else | 236 | else |
235 | { | 237 | { |
236 | MainLog.Instance.Error( | 238 | m_log.Error(String.Format( |
237 | "PRIMINVENTORY", | 239 | "[PRIMINVENTORY]: " + |
238 | "Couldn't find prim ID {0} to update item {1}, {2}", | 240 | "Couldn't find prim ID {0} to update item {1}, {2}", |
239 | item.ParentPartID, item.Name, item.ItemID); | 241 | item.ParentPartID, item.Name, item.ItemID)); |
240 | } | 242 | } |
241 | 243 | ||
242 | return false; | 244 | return false; |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 10395b6..4fe7b55 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -1003,9 +1003,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
1003 | } | 1003 | } |
1004 | else | 1004 | else |
1005 | { | 1005 | { |
1006 | MainLog.Instance.Verbose("SCENE", | 1006 | m_log.Info(String.Format("[SCENE]: " + |
1007 | "DelinkFromGroup(): Child prim local id {0} not found in object with root prim id {1}", | 1007 | "DelinkFromGroup(): Child prim local id {0} not found in object with root prim id {1}", |
1008 | partID, LocalId); | 1008 | partID, LocalId)); |
1009 | } | 1009 | } |
1010 | } | 1010 | } |
1011 | 1011 | ||
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs index d4e2102..d9ee94c 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs | |||
@@ -41,6 +41,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
41 | { | 41 | { |
42 | public partial class SceneObjectPart : IScriptHost | 42 | public partial class SceneObjectPart : IScriptHost |
43 | { | 43 | { |
44 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
45 | |||
44 | private string m_inventoryFileName = String.Empty; | 46 | private string m_inventoryFileName = String.Empty; |
45 | 47 | ||
46 | /// <summary> | 48 | /// <summary> |
@@ -131,10 +133,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
131 | /// <returns></returns> | 133 | /// <returns></returns> |
132 | public void StartScript(TaskInventoryItem item) | 134 | public void StartScript(TaskInventoryItem item) |
133 | { | 135 | { |
134 | // MainLog.Instance.Verbose( | 136 | // m_log.Info(String.Format( |
135 | // "PRIMINVENTORY", | 137 | // "[PRIMINVENTORY]: " + |
136 | // "Starting script {0}, {1} in prim {2}, {3}", | 138 | // "Starting script {0}, {1} in prim {2}, {3}", |
137 | // item.Name, item.ItemID, Name, UUID); | 139 | // item.Name, item.ItemID, Name, UUID)); |
138 | 140 | ||
139 | AssetBase rezAsset = m_parentGroup.Scene.AssetCache.GetAsset(item.AssetID, false); | 141 | AssetBase rezAsset = m_parentGroup.Scene.AssetCache.GetAsset(item.AssetID, false); |
140 | 142 | ||
@@ -145,10 +147,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
145 | } | 147 | } |
146 | else | 148 | else |
147 | { | 149 | { |
148 | MainLog.Instance.Error( | 150 | m_log.Error(String.Format( |
149 | "PRIMINVENTORY", | 151 | "[PRIMINVENTORY]: " + |
150 | "Couldn't start script {0}, {1} since asset ID {2} could not be found", | 152 | "Couldn't start script {0}, {1} since asset ID {2} could not be found", |
151 | item.Name, item.ItemID, item.AssetID); | 153 | item.Name, item.ItemID, item.AssetID)); |
152 | } | 154 | } |
153 | } | 155 | } |
154 | 156 | ||
@@ -168,10 +170,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
168 | } | 170 | } |
169 | else | 171 | else |
170 | { | 172 | { |
171 | MainLog.Instance.Error( | 173 | m_log.Error(String.Format( |
172 | "PRIMINVENTORY", | 174 | "[PRIMINVENTORY]: " + |
173 | "Couldn't start script with ID {0} since it couldn't be found for prim {1}, {2}", | 175 | "Couldn't start script with ID {0} since it couldn't be found for prim {1}, {2}", |
174 | itemId, Name, UUID); | 176 | itemId, Name, UUID)); |
175 | } | 177 | } |
176 | } | 178 | } |
177 | } | 179 | } |
@@ -188,10 +190,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
188 | } | 190 | } |
189 | else | 191 | else |
190 | { | 192 | { |
191 | MainLog.Instance.Error( | 193 | m_log.Error(String.Format( |
192 | "PRIMINVENTORY", | 194 | "[PRIMINVENTORY]: " + |
193 | "Couldn't stop script with ID {0} since it couldn't be found for prim {1}, {2}", | 195 | "Couldn't stop script with ID {0} since it couldn't be found for prim {1}, {2}", |
194 | itemId, Name, UUID); | 196 | itemId, Name, UUID)); |
195 | } | 197 | } |
196 | } | 198 | } |
197 | 199 | ||
@@ -251,10 +253,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
251 | } | 253 | } |
252 | else | 254 | else |
253 | { | 255 | { |
254 | MainLog.Instance.Error( | 256 | m_log.Error(String.Format( |
255 | "PRIMINVENTORY", | 257 | "[PRIMINVENTORY]: " + |
256 | "Tried to retrieve item ID {0} from prim {1}, {2} but the item does not exist in this inventory", | 258 | "Tried to retrieve item ID {0} from prim {1}, {2} but the item does not exist in this inventory", |
257 | itemID, Name, UUID); | 259 | itemID, Name, UUID)); |
258 | } | 260 | } |
259 | } | 261 | } |
260 | 262 | ||
@@ -283,10 +285,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
283 | } | 285 | } |
284 | else | 286 | else |
285 | { | 287 | { |
286 | MainLog.Instance.Error( | 288 | m_log.Error(String.Format( |
287 | "PRIMINVENTORY", | 289 | "[PRIMINVENTORY]: " + |
288 | "Tried to retrieve item ID {0} from prim {1}, {2} but the item does not exist in this inventory", | 290 | "Tried to retrieve item ID {0} from prim {1}, {2} but the item does not exist in this inventory", |
289 | item.ItemID, Name, UUID); | 291 | item.ItemID, Name, UUID)); |
290 | } | 292 | } |
291 | } | 293 | } |
292 | 294 | ||
@@ -316,10 +318,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
316 | } | 318 | } |
317 | else | 319 | else |
318 | { | 320 | { |
319 | MainLog.Instance.Error( | 321 | m_log.Error(String.Format( |
320 | "PRIMINVENTORY", | 322 | "[PRIMINVENTORY]: " + |
321 | "Tried to remove item ID {0} from prim {1}, {2} but the item does not exist in this inventory", | 323 | "Tried to remove item ID {0} from prim {1}, {2} but the item does not exist in this inventory", |
322 | itemID, Name, UUID); | 324 | itemID, Name, UUID)); |
323 | } | 325 | } |
324 | } | 326 | } |
325 | 327 | ||
@@ -384,8 +386,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
384 | 386 | ||
385 | fileData = Helpers.StringToField(invString.BuildString); | 387 | fileData = Helpers.StringToField(invString.BuildString); |
386 | 388 | ||
387 | // MainLog.Instance.Verbose( | 389 | // m_log.Info(String.Format( |
388 | // "PRIMINVENTORY", "RequestInventoryFile fileData: {0}", Helpers.FieldToUTF8String(fileData)); | 390 | // "[PRIMINVENTORY]: RequestInventoryFile fileData: {0}", Helpers.FieldToUTF8String(fileData))); |
389 | 391 | ||
390 | if (fileData.Length > 2) | 392 | if (fileData.Length > 2) |
391 | { | 393 | { |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 0ba64f2..4456fce 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -306,7 +306,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
306 | { | 306 | { |
307 | // Ignore, and skip over. | 307 | // Ignore, and skip over. |
308 | } | 308 | } |
309 | //MainLog.Instance.Verbose("PART", "OFFSET:" + m_offsetPosition, ToString()); | 309 | //m_log.Info("[PART]: OFFSET:" + m_offsetPosition.ToString()); |
310 | } | 310 | } |
311 | } | 311 | } |
312 | 312 | ||
@@ -347,14 +347,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
347 | if (ParentID == 0) | 347 | if (ParentID == 0) |
348 | { | 348 | { |
349 | PhysActor.Orientation = new Quaternion(value.W, value.X, value.Y, value.Z); | 349 | PhysActor.Orientation = new Quaternion(value.W, value.X, value.Y, value.Z); |
350 | //MainLog.Instance.Verbose("PART", "RO1:" + PhysActor.Orientation.ToString()); | 350 | //m_log.Info("[PART]: RO1:" + PhysActor.Orientation.ToString()); |
351 | } | 351 | } |
352 | else | 352 | else |
353 | { | 353 | { |
354 | // Child prim we have to calculate it's world rotationwel | 354 | // Child prim we have to calculate it's world rotationwel |
355 | LLQuaternion resultingrotation = GetWorldRotation(); | 355 | LLQuaternion resultingrotation = GetWorldRotation(); |
356 | PhysActor.Orientation = new Quaternion(resultingrotation.W, resultingrotation.X, resultingrotation.Y, resultingrotation.Z); | 356 | PhysActor.Orientation = new Quaternion(resultingrotation.W, resultingrotation.X, resultingrotation.Y, resultingrotation.Z); |
357 | //MainLog.Instance.Verbose("PART", "RO2:" + PhysActor.Orientation.ToString()); | 357 | //m_log.Info("[PART]: RO2:" + PhysActor.Orientation.ToString()); |
358 | } | 358 | } |
359 | m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); | 359 | m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); |
360 | //} | 360 | //} |
@@ -1554,14 +1554,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
1554 | // Are we the owner? | 1554 | // Are we the owner? |
1555 | if (AgentID == OwnerID) | 1555 | if (AgentID == OwnerID) |
1556 | { | 1556 | { |
1557 | MainLog.Instance.Verbose("PERMISSIONS", | 1557 | m_log.Info("[PERMISSIONS]: field: " + field.ToString() + ", mask: " + mask.ToString() + " addRemTF: " + |
1558 | "field: " + field.ToString() + ", mask: " + mask.ToString() + " addRemTF: " + | 1558 | addRemTF.ToString()); |
1559 | addRemTF.ToString()); | ||
1560 | 1559 | ||
1561 | //Field 8 = EveryoneMask | 1560 | //Field 8 = EveryoneMask |
1562 | if (field == (byte) 8) | 1561 | if (field == (byte) 8) |
1563 | { | 1562 | { |
1564 | MainLog.Instance.Verbose("PERMISSIONS", "Left over: " + (OwnerMask - EveryoneMask)); | 1563 | m_log.Info("[PERMISSIONS]: Left over: " + (OwnerMask - EveryoneMask)); |
1565 | if (addRemTF == (byte) 0) | 1564 | if (addRemTF == (byte) 0) |
1566 | { | 1565 | { |
1567 | //EveryoneMask = (uint)0; | 1566 | //EveryoneMask = (uint)0; |
@@ -1751,7 +1750,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1751 | 1750 | ||
1752 | public void PhysicsOutOfBounds(PhysicsVector pos) | 1751 | public void PhysicsOutOfBounds(PhysicsVector pos) |
1753 | { | 1752 | { |
1754 | MainLog.Instance.Verbose("PHYSICS", "Physical Object went out of bounds."); | 1753 | m_log.Info("[PHYSICS]: Physical Object went out of bounds."); |
1755 | RemFlag(LLObject.ObjectFlags.Physics); | 1754 | RemFlag(LLObject.ObjectFlags.Physics); |
1756 | DoPhysicsPropertyUpdate(false, true); | 1755 | DoPhysicsPropertyUpdate(false, true); |
1757 | m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); | 1756 | m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); |
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 659a1f5..5c33dfc 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -39,6 +39,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
39 | { | 39 | { |
40 | public class ScenePresence : EntityBase | 40 | public class ScenePresence : EntityBase |
41 | { | 41 | { |
42 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
43 | |||
42 | public static AvatarAnimations Animations; | 44 | public static AvatarAnimations Animations; |
43 | public static byte[] DefaultTexture; | 45 | public static byte[] DefaultTexture; |
44 | public LLUUID currentParcelUUID = LLUUID.Zero; | 46 | public LLUUID currentParcelUUID = LLUUID.Zero; |
@@ -345,7 +347,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
345 | } | 347 | } |
346 | catch (KeyNotFoundException) | 348 | catch (KeyNotFoundException) |
347 | { | 349 | { |
348 | MainLog.Instance.Warn("AVATAR", "KeyNotFound Exception playing avatar stand animation"); | 350 | m_log.Warn("[AVATAR]: KeyNotFound Exception playing avatar stand animation"); |
349 | } | 351 | } |
350 | m_animationSeqs.Add(1); | 352 | m_animationSeqs.Add(1); |
351 | 353 | ||
@@ -933,7 +935,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
933 | } | 935 | } |
934 | else | 936 | else |
935 | { | 937 | { |
936 | MainLog.Instance.Warn("Sit requested on unknown object: " + targetID.ToString()); | 938 | m_log.Warn("Sit requested on unknown object: " + targetID.ToString()); |
937 | } | 939 | } |
938 | SendSitResponse(remoteClient, targetID, offset); | 940 | SendSitResponse(remoteClient, targetID, offset); |
939 | } | 941 | } |
@@ -1047,7 +1049,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1047 | } | 1049 | } |
1048 | catch | 1050 | catch |
1049 | { | 1051 | { |
1050 | MainLog.Instance.Warn("AVATAR", "SetMovementAnimation for avatar failed. Attempting recovery..."); | 1052 | m_log.Warn("[AVATAR]: SetMovementAnimation for avatar failed. Attempting recovery..."); |
1051 | m_animations[0] = anim; | 1053 | m_animations[0] = anim; |
1052 | m_animationSeqs[0] = seq; | 1054 | m_animationSeqs[0] = seq; |
1053 | SendAnimPack(); | 1055 | SendAnimPack(); |
@@ -1184,13 +1186,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
1184 | //bool controlland = (((m_AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) || ((m_AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG) != 0)); | 1186 | //bool controlland = (((m_AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) || ((m_AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG) != 0)); |
1185 | //bool colliding = (m_physicsActor.IsColliding==true); | 1187 | //bool colliding = (m_physicsActor.IsColliding==true); |
1186 | //if (controlland) | 1188 | //if (controlland) |
1187 | // MainLog.Instance.Verbose("AGENT","landCommand"); | 1189 | // m_log.Info("[AGENT]: landCommand"); |
1188 | //if (colliding ) | 1190 | //if (colliding ) |
1189 | // MainLog.Instance.Verbose("AGENT","colliding"); | 1191 | // m_log.Info("[AGENT]: colliding"); |
1190 | //if (m_physicsActor.Flying && colliding && controlland) | 1192 | //if (m_physicsActor.Flying && colliding && controlland) |
1191 | //{ | 1193 | //{ |
1192 | // StopFlying(); | 1194 | // StopFlying(); |
1193 | // MainLog.Instance.Verbose("AGENT", "Stop FLying"); | 1195 | // m_log.Info("[AGENT]: Stop FLying"); |
1194 | //} | 1196 | //} |
1195 | } | 1197 | } |
1196 | else | 1198 | else |
diff --git a/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineInterface.cs b/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineInterface.cs index d781806..5d432f5 100644 --- a/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineInterface.cs +++ b/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineInterface.cs | |||
@@ -33,7 +33,7 @@ namespace OpenSim.Region.Environment.Scenes.Scripting | |||
33 | { | 33 | { |
34 | public interface ScriptEngineInterface | 34 | public interface ScriptEngineInterface |
35 | { | 35 | { |
36 | void InitializeEngine(Scene Sceneworld, LogBase logger); | 36 | void InitializeEngine(Scene Sceneworld); |
37 | void Shutdown(); | 37 | void Shutdown(); |
38 | // void StartScript(string ScriptID, IScriptHost ObjectID); | 38 | // void StartScript(string ScriptID, IScriptHost ObjectID); |
39 | } | 39 | } |
diff --git a/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineLoader.cs b/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineLoader.cs index 74f9358..b52b2e9 100644 --- a/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineLoader.cs +++ b/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineLoader.cs | |||
@@ -35,12 +35,7 @@ namespace OpenSim.Region.Environment.Scenes.Scripting | |||
35 | { | 35 | { |
36 | public class ScriptEngineLoader | 36 | public class ScriptEngineLoader |
37 | { | 37 | { |
38 | private LogBase m_log; | 38 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
39 | |||
40 | public ScriptEngineLoader(LogBase logger) | ||
41 | { | ||
42 | m_log = logger; | ||
43 | } | ||
44 | 39 | ||
45 | public ScriptEngineInterface LoadScriptEngine(string EngineName) | 40 | public ScriptEngineInterface LoadScriptEngine(string EngineName) |
46 | { | 41 | { |
@@ -54,7 +49,7 @@ namespace OpenSim.Region.Environment.Scenes.Scripting | |||
54 | } | 49 | } |
55 | catch (Exception e) | 50 | catch (Exception e) |
56 | { | 51 | { |
57 | m_log.Error("ScriptEngine", | 52 | m_log.Error("[ScriptEngine]: " + |
58 | "Error loading assembly \"" + EngineName + "\": " + e.Message + ", " + | 53 | "Error loading assembly \"" + EngineName + "\": " + e.Message + ", " + |
59 | e.StackTrace.ToString()); | 54 | e.StackTrace.ToString()); |
60 | } | 55 | } |
@@ -88,7 +83,7 @@ namespace OpenSim.Region.Environment.Scenes.Scripting | |||
88 | //} | 83 | //} |
89 | //catch (Exception e) | 84 | //catch (Exception e) |
90 | //{ | 85 | //{ |
91 | // m_log.Error("ScriptEngine", "Error loading assembly \String.Empty + FileName + "\": " + e.ToString()); | 86 | // m_log.Error("[ScriptEngine]: Error loading assembly \String.Empty + FileName + "\": " + e.ToString()); |
92 | //} | 87 | //} |
93 | 88 | ||
94 | 89 | ||
@@ -105,7 +100,7 @@ namespace OpenSim.Region.Environment.Scenes.Scripting | |||
105 | //} | 100 | //} |
106 | //catch (Exception e) | 101 | //catch (Exception e) |
107 | //{ | 102 | //{ |
108 | // m_log.Error("ScriptEngine", "Error initializing type \String.Empty + NameSpace + "\" from \String.Empty + FileName + "\": " + e.ToString()); | 103 | // m_log.Error("[ScriptEngine]: Error initializing type \String.Empty + NameSpace + "\" from \String.Empty + FileName + "\": " + e.ToString()); |
109 | //} | 104 | //} |
110 | 105 | ||
111 | ScriptEngineInterface ret; | 106 | ScriptEngineInterface ret; |
@@ -115,7 +110,7 @@ namespace OpenSim.Region.Environment.Scenes.Scripting | |||
115 | //} | 110 | //} |
116 | //catch (Exception e) | 111 | //catch (Exception e) |
117 | //{ | 112 | //{ |
118 | // m_log.Error("ScriptEngine", "Error initializing type \String.Empty + NameSpace + "\" from \String.Empty + FileName + "\": " + e.ToString()); | 113 | // m_log.Error("[ScriptEngine]: Error initializing type \String.Empty + NameSpace + "\" from \String.Empty + FileName + "\": " + e.ToString()); |
119 | //} | 114 | //} |
120 | 115 | ||
121 | return ret; | 116 | return ret; |
diff --git a/OpenSim/Region/Environment/StorageManager.cs b/OpenSim/Region/Environment/StorageManager.cs index 1c41373..f15bbdb 100644 --- a/OpenSim/Region/Environment/StorageManager.cs +++ b/OpenSim/Region/Environment/StorageManager.cs | |||
@@ -35,6 +35,8 @@ namespace OpenSim.Region.Environment | |||
35 | { | 35 | { |
36 | public class StorageManager | 36 | public class StorageManager |
37 | { | 37 | { |
38 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
39 | |||
38 | private IRegionDataStore m_dataStore; | 40 | private IRegionDataStore m_dataStore; |
39 | 41 | ||
40 | public IRegionDataStore DataStore | 42 | public IRegionDataStore DataStore |
@@ -49,7 +51,7 @@ namespace OpenSim.Region.Environment | |||
49 | 51 | ||
50 | public StorageManager(string dllName, string connectionstring, bool persistPrimInventories) | 52 | public StorageManager(string dllName, string connectionstring, bool persistPrimInventories) |
51 | { | 53 | { |
52 | MainLog.Instance.Verbose("DATASTORE", "Attempting to load " + dllName); | 54 | m_log.Info("[DATASTORE]: Attempting to load " + dllName); |
53 | Assembly pluginAssembly = Assembly.LoadFrom(dllName); | 55 | Assembly pluginAssembly = Assembly.LoadFrom(dllName); |
54 | 56 | ||
55 | foreach (Type pluginType in pluginAssembly.GetTypes()) | 57 | foreach (Type pluginType in pluginAssembly.GetTypes()) |
@@ -66,7 +68,7 @@ namespace OpenSim.Region.Environment | |||
66 | 68 | ||
67 | m_dataStore = plug; | 69 | m_dataStore = plug; |
68 | 70 | ||
69 | MainLog.Instance.Verbose("DATASTORE", "Added IRegionDataStore Interface"); | 71 | m_log.Info("[DATASTORE]: Added IRegionDataStore Interface"); |
70 | } | 72 | } |
71 | } | 73 | } |
72 | } | 74 | } |
diff --git a/OpenSim/Region/Examples/SimpleApp/Program.cs b/OpenSim/Region/Examples/SimpleApp/Program.cs index 6c18540..f919276 100644 --- a/OpenSim/Region/Examples/SimpleApp/Program.cs +++ b/OpenSim/Region/Examples/SimpleApp/Program.cs | |||
@@ -51,9 +51,9 @@ namespace SimpleApp | |||
51 | private string m_userPlugin = "OpenSim.Framework.Data.SQLite.dll"; | 51 | private string m_userPlugin = "OpenSim.Framework.Data.SQLite.dll"; |
52 | private string m_inventoryPlugin = "OpenSim.Framework.Data.SQLite.dll"; | 52 | private string m_inventoryPlugin = "OpenSim.Framework.Data.SQLite.dll"; |
53 | 53 | ||
54 | protected override LogBase CreateLog() | 54 | protected override ConsoleBase CreateConsole() |
55 | { | 55 | { |
56 | return new LogBase(null, "SimpleApp", this, true); | 56 | return new ConsoleBase("SimpleApp", this); |
57 | } | 57 | } |
58 | 58 | ||
59 | protected override void Initialize() | 59 | protected override void Initialize() |
@@ -64,12 +64,12 @@ namespace SimpleApp | |||
64 | 64 | ||
65 | LocalAssetServer assetServer = new LocalAssetServer(); | 65 | LocalAssetServer assetServer = new LocalAssetServer(); |
66 | 66 | ||
67 | m_assetCache = new AssetCache(assetServer, m_log); | 67 | m_assetCache = new AssetCache(assetServer); |
68 | } | 68 | } |
69 | 69 | ||
70 | public void Run() | 70 | public void Run() |
71 | { | 71 | { |
72 | StartLog(); | 72 | StartConsole(); |
73 | StartUp(); | 73 | StartUp(); |
74 | 74 | ||
75 | LocalInventoryService inventoryService = new LocalInventoryService(); | 75 | LocalInventoryService inventoryService = new LocalInventoryService(); |
@@ -94,7 +94,7 @@ namespace SimpleApp | |||
94 | 94 | ||
95 | m_httpServer.AddXmlRPCHandler("login_to_simulator", loginService.XmlRpcLoginMethod); | 95 | m_httpServer.AddXmlRPCHandler("login_to_simulator", loginService.XmlRpcLoginMethod); |
96 | 96 | ||
97 | m_log.Notice(m_log.LineInfo); | 97 | m_console.Notice(m_console.LineInfo); |
98 | 98 | ||
99 | IPEndPoint internalEndPoint = | 99 | IPEndPoint internalEndPoint = |
100 | new IPEndPoint(IPAddress.Parse("127.0.0.1"), (int) m_networkServersInfo.HttpListenerPort); | 100 | new IPEndPoint(IPAddress.Parse("127.0.0.1"), (int) m_networkServersInfo.HttpListenerPort); |
@@ -104,7 +104,7 @@ namespace SimpleApp | |||
104 | 104 | ||
105 | UDPServer udpServer; | 105 | UDPServer udpServer; |
106 | 106 | ||
107 | m_moduleLoader = new ModuleLoader(m_log, m_config); | 107 | m_moduleLoader = new ModuleLoader(m_config); |
108 | m_moduleLoader.LoadDefaultSharedModules(); | 108 | m_moduleLoader.LoadDefaultSharedModules(); |
109 | 109 | ||
110 | Scene scene = SetupScene(regionInfo, out udpServer, false); | 110 | Scene scene = SetupScene(regionInfo, out udpServer, false); |
@@ -170,8 +170,8 @@ namespace SimpleApp | |||
170 | scene.AddEntity(fileObject); | 170 | scene.AddEntity(fileObject); |
171 | } | 171 | } |
172 | 172 | ||
173 | m_log.Notice("Press enter to quit."); | 173 | m_console.Notice("Press enter to quit."); |
174 | m_log.ReadLine(); | 174 | m_console.ReadLine(); |
175 | } | 175 | } |
176 | 176 | ||
177 | protected override Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager, | 177 | protected override Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager, |
@@ -182,7 +182,7 @@ namespace SimpleApp | |||
182 | return | 182 | return |
183 | new MyWorld(regionInfo, circuitManager, permissionManager, m_commsManager, sceneGridService, | 183 | new MyWorld(regionInfo, circuitManager, permissionManager, m_commsManager, sceneGridService, |
184 | m_assetCache, storageManager, m_httpServer, | 184 | m_assetCache, storageManager, m_httpServer, |
185 | new ModuleLoader(m_log, m_config), true, false); | 185 | new ModuleLoader(m_config), true, false); |
186 | } | 186 | } |
187 | 187 | ||
188 | protected override StorageManager CreateStorageManager(string connectionstring) | 188 | protected override StorageManager CreateStorageManager(string connectionstring) |
@@ -211,6 +211,8 @@ namespace SimpleApp | |||
211 | 211 | ||
212 | private static void Main(string[] args) | 212 | private static void Main(string[] args) |
213 | { | 213 | { |
214 | log4net.Config.XmlConfigurator.Configure(); | ||
215 | |||
214 | Program app = new Program(); | 216 | Program app = new Program(); |
215 | 217 | ||
216 | app.Run(); | 218 | app.Run(); |
diff --git a/OpenSim/Region/ExtensionsScriptModule/Engines/CSharp/CSharpScriptEngine.cs b/OpenSim/Region/ExtensionsScriptModule/Engines/CSharp/CSharpScriptEngine.cs index b625f43..03d478f 100644 --- a/OpenSim/Region/ExtensionsScriptModule/Engines/CSharp/CSharpScriptEngine.cs +++ b/OpenSim/Region/ExtensionsScriptModule/Engines/CSharp/CSharpScriptEngine.cs | |||
@@ -35,6 +35,8 @@ namespace OpenSim.Region.ExtensionsScriptModule.CSharp | |||
35 | { | 35 | { |
36 | public class CSharpScriptEngine : IScriptCompiler | 36 | public class CSharpScriptEngine : IScriptCompiler |
37 | { | 37 | { |
38 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
39 | |||
38 | public string FileExt() | 40 | public string FileExt() |
39 | { | 41 | { |
40 | return ".cs"; | 42 | return ".cs"; |
@@ -58,10 +60,10 @@ namespace OpenSim.Region.ExtensionsScriptModule.CSharp | |||
58 | 60 | ||
59 | if (compilerResults.Errors.Count > 0) | 61 | if (compilerResults.Errors.Count > 0) |
60 | { | 62 | { |
61 | MainLog.Instance.Error("Compile errors"); | 63 | m_log.Error("Compile errors"); |
62 | foreach (CompilerError error in compilerResults.Errors) | 64 | foreach (CompilerError error in compilerResults.Errors) |
63 | { | 65 | { |
64 | MainLog.Instance.Error(error.Line.ToString() + ": " + error.ErrorText.ToString()); | 66 | m_log.Error(error.Line.ToString() + ": " + error.ErrorText.ToString()); |
65 | } | 67 | } |
66 | } | 68 | } |
67 | else | 69 | else |
diff --git a/OpenSim/Region/ExtensionsScriptModule/Engines/JScript/JScriptEngine.cs b/OpenSim/Region/ExtensionsScriptModule/Engines/JScript/JScriptEngine.cs index bc5c413..dbe0dca 100644 --- a/OpenSim/Region/ExtensionsScriptModule/Engines/JScript/JScriptEngine.cs +++ b/OpenSim/Region/ExtensionsScriptModule/Engines/JScript/JScriptEngine.cs | |||
@@ -35,6 +35,8 @@ namespace OpenSim.Region.ExtensionsScriptModule.JScript | |||
35 | { | 35 | { |
36 | public class JScriptEngine : IScriptCompiler | 36 | public class JScriptEngine : IScriptCompiler |
37 | { | 37 | { |
38 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
39 | |||
38 | public string FileExt() | 40 | public string FileExt() |
39 | { | 41 | { |
40 | return ".js"; | 42 | return ".js"; |
@@ -58,10 +60,10 @@ namespace OpenSim.Region.ExtensionsScriptModule.JScript | |||
58 | 60 | ||
59 | if (compilerResults.Errors.Count > 0) | 61 | if (compilerResults.Errors.Count > 0) |
60 | { | 62 | { |
61 | MainLog.Instance.Error("Compile errors"); | 63 | m_log.Error("Compile errors"); |
62 | foreach (CompilerError error in compilerResults.Errors) | 64 | foreach (CompilerError error in compilerResults.Errors) |
63 | { | 65 | { |
64 | MainLog.Instance.Error(error.Line.ToString() + ": " + error.ErrorText.ToString()); | 66 | m_log.Error(error.Line.ToString() + ": " + error.ErrorText.ToString()); |
65 | } | 67 | } |
66 | } | 68 | } |
67 | else | 69 | else |
diff --git a/OpenSim/Region/ExtensionsScriptModule/Script.cs b/OpenSim/Region/ExtensionsScriptModule/Script.cs index 0555277..d9d569b 100644 --- a/OpenSim/Region/ExtensionsScriptModule/Script.cs +++ b/OpenSim/Region/ExtensionsScriptModule/Script.cs | |||
@@ -53,12 +53,12 @@ namespace OpenSim.Region.ExtensionsScriptModule | |||
53 | 53 | ||
54 | private void events_OnNewPresence(ScenePresence presence) | 54 | private void events_OnNewPresence(ScenePresence presence) |
55 | { | 55 | { |
56 | script.logger.Verbose("TESTSCRIPT", "Hello " + presence.Firstname.ToString() + "!"); | 56 | script.Log.Info("[TESTSCRIPT]: Hello " + presence.Firstname.ToString() + "!"); |
57 | } | 57 | } |
58 | 58 | ||
59 | private void events_OnFrame() | 59 | private void events_OnFrame() |
60 | { | 60 | { |
61 | //script.logger.Verbose("TESTSCRIPT", "Hello World!"); | 61 | //script.logger.Info("[TESTSCRIPT]: Hello World!"); |
62 | } | 62 | } |
63 | } | 63 | } |
64 | } \ No newline at end of file | 64 | } |
diff --git a/OpenSim/Region/ExtensionsScriptModule/ScriptInfo.cs b/OpenSim/Region/ExtensionsScriptModule/ScriptInfo.cs index af54a4e..e90bfc1 100644 --- a/OpenSim/Region/ExtensionsScriptModule/ScriptInfo.cs +++ b/OpenSim/Region/ExtensionsScriptModule/ScriptInfo.cs | |||
@@ -36,23 +36,26 @@ namespace OpenSim.Region.ExtensionsScriptModule | |||
36 | /// </summary> | 36 | /// </summary> |
37 | public class ScriptInfo | 37 | public class ScriptInfo |
38 | { | 38 | { |
39 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
40 | |||
39 | // Reference to world.eventsManager provided for convenience | 41 | // Reference to world.eventsManager provided for convenience |
40 | public EventManager events; | 42 | public EventManager events; |
41 | 43 | ||
42 | // The main world | 44 | // The main world |
43 | public Scene world; | 45 | public Scene world; |
44 | 46 | ||
45 | // The console | ||
46 | public LogBase logger; | ||
47 | |||
48 | // API Access | 47 | // API Access |
49 | public ScriptAPI api; | 48 | public ScriptAPI api; |
50 | 49 | ||
50 | public log4net.ILog Log | ||
51 | { | ||
52 | get { return m_log; } | ||
53 | } | ||
54 | |||
51 | public ScriptInfo(Scene scene) | 55 | public ScriptInfo(Scene scene) |
52 | { | 56 | { |
53 | world = scene; | 57 | world = scene; |
54 | events = world.EventManager; | 58 | events = world.EventManager; |
55 | logger = MainLog.Instance; | ||
56 | api = new ScriptAPI(world, LLUUID.Zero); | 59 | api = new ScriptAPI(world, LLUUID.Zero); |
57 | } | 60 | } |
58 | 61 | ||
diff --git a/OpenSim/Region/ExtensionsScriptModule/ScriptInterpretedAPI.cs b/OpenSim/Region/ExtensionsScriptModule/ScriptInterpretedAPI.cs index b3a0d4f..0f50358 100644 --- a/OpenSim/Region/ExtensionsScriptModule/ScriptInterpretedAPI.cs +++ b/OpenSim/Region/ExtensionsScriptModule/ScriptInterpretedAPI.cs | |||
@@ -45,6 +45,8 @@ namespace OpenSim.Region.ExtensionsScriptModule | |||
45 | /// <remarks>Avoid at all costs. This should ONLY be used for LSL.</remarks> | 45 | /// <remarks>Avoid at all costs. This should ONLY be used for LSL.</remarks> |
46 | internal class ScriptInterpretedAPI | 46 | internal class ScriptInterpretedAPI |
47 | { | 47 | { |
48 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
49 | |||
48 | protected Key m_object; | 50 | protected Key m_object; |
49 | protected Scene m_scene; | 51 | protected Scene m_scene; |
50 | 52 | ||
@@ -109,7 +111,7 @@ namespace OpenSim.Region.ExtensionsScriptModule | |||
109 | { | 111 | { |
110 | //Dont do anything! | 112 | //Dont do anything! |
111 | } | 113 | } |
112 | MainLog.Instance.Warn("script", | 114 | m_log.Warn("[script]: " + |
113 | "Unimplemented function called by script: osAddToLandPassList(Key avatar, float hours)"); | 115 | "Unimplemented function called by script: osAddToLandPassList(Key avatar, float hours)"); |
114 | return; | 116 | return; |
115 | } | 117 | } |
@@ -117,7 +119,7 @@ namespace OpenSim.Region.ExtensionsScriptModule | |||
117 | [Obsolete("Unimplemented")] | 119 | [Obsolete("Unimplemented")] |
118 | public void osAdjustSoundVolume(float volume) | 120 | public void osAdjustSoundVolume(float volume) |
119 | { | 121 | { |
120 | MainLog.Instance.Warn("script", "Unimplemented function called by script: osAdjustSoundVolume(float volume)"); | 122 | m_log.Warn("[script]: Unimplemented function called by script: osAdjustSoundVolume(float volume)"); |
121 | return; | 123 | return; |
122 | } | 124 | } |
123 | 125 | ||
diff --git a/OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs b/OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs index d080ab8..6c2d940 100644 --- a/OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs +++ b/OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs | |||
@@ -38,6 +38,8 @@ namespace OpenSim.Region.ExtensionsScriptModule | |||
38 | { | 38 | { |
39 | public class ScriptManager : IRegionModule, IExtensionScriptModule | 39 | public class ScriptManager : IRegionModule, IExtensionScriptModule |
40 | { | 40 | { |
41 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
42 | |||
41 | private readonly List<IScript> scripts = new List<IScript>(); | 43 | private readonly List<IScript> scripts = new List<IScript>(); |
42 | private Scene m_scene; | 44 | private Scene m_scene; |
43 | private readonly Dictionary<string, IScriptCompiler> compilers = new Dictionary<string, IScriptCompiler>(); | 45 | private readonly Dictionary<string, IScriptCompiler> compilers = new Dictionary<string, IScriptCompiler>(); |
@@ -48,12 +50,12 @@ namespace OpenSim.Region.ExtensionsScriptModule | |||
48 | { | 50 | { |
49 | ScriptInfo scriptInfo = new ScriptInfo(m_scene); | 51 | ScriptInfo scriptInfo = new ScriptInfo(m_scene); |
50 | // Since each script could potentially corrupt their access with a stray assignment, making a new one for each script. | 52 | // Since each script could potentially corrupt their access with a stray assignment, making a new one for each script. |
51 | MainLog.Instance.Verbose("SCRIPT", "Loading " + script.Key); | 53 | m_log.Info("[SCRIPT]: Loading " + script.Key); |
52 | script.Value.Initialise(scriptInfo); | 54 | script.Value.Initialise(scriptInfo); |
53 | scripts.Add(script.Value); | 55 | scripts.Add(script.Value); |
54 | } | 56 | } |
55 | 57 | ||
56 | MainLog.Instance.Verbose("SCRIPT", string.Format("Finished loading {0} script(s)", compiledscripts.Count)); | 58 | m_log.Info("[SCRIPT]: " + string.Format("Finished loading {0} script(s)", compiledscripts.Count)); |
57 | } | 59 | } |
58 | 60 | ||
59 | public ScriptManager() | 61 | public ScriptManager() |
@@ -71,7 +73,7 @@ namespace OpenSim.Region.ExtensionsScriptModule | |||
71 | 73 | ||
72 | public void Initialise(Scene scene, IConfigSource config) | 74 | public void Initialise(Scene scene, IConfigSource config) |
73 | { | 75 | { |
74 | MainLog.Instance.Verbose("SCRIPTMODULE", "Initialising Extensions Scripting Module"); | 76 | m_log.Info("[SCRIPTMODULE]: Initialising Extensions Scripting Module"); |
75 | m_scene = scene; | 77 | m_scene = scene; |
76 | 78 | ||
77 | m_scene.RegisterModuleInterface<IExtensionScriptModule>(this); | 79 | m_scene.RegisterModuleInterface<IExtensionScriptModule>(this); |
@@ -118,14 +120,14 @@ namespace OpenSim.Region.ExtensionsScriptModule | |||
118 | break; | 120 | break; |
119 | 121 | ||
120 | default: | 122 | default: |
121 | MainLog.Instance.Error("Unknown script command"); | 123 | m_log.Error("Unknown script command"); |
122 | break; | 124 | break; |
123 | } | 125 | } |
124 | } | 126 | } |
125 | 127 | ||
126 | public bool AddPreCompiledScript(IScript script) | 128 | public bool AddPreCompiledScript(IScript script) |
127 | { | 129 | { |
128 | MainLog.Instance.Verbose("SCRIPT", "Loading script " + script.Name); | 130 | m_log.Info("[SCRIPT]: Loading script " + script.Name); |
129 | ScriptInfo scriptInfo = new ScriptInfo(m_scene); | 131 | ScriptInfo scriptInfo = new ScriptInfo(m_scene); |
130 | // Since each script could potentially corrupt their access with a stray assignment, making a new one for each script. | 132 | // Since each script could potentially corrupt their access with a stray assignment, making a new one for each script. |
131 | script.Initialise(scriptInfo); | 133 | script.Initialise(scriptInfo); |
diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs index b76fbbf..919910c 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs | |||
@@ -55,4 +55,4 @@ using System.Runtime.InteropServices; | |||
55 | // You can specify all values by your own or you can build default build and revision | 55 | // You can specify all values by your own or you can build default build and revision |
56 | // numbers with the '*' character (the default): | 56 | // numbers with the '*' character (the default): |
57 | 57 | ||
58 | [assembly : AssemblyVersion("1.0.*")] \ No newline at end of file | 58 | [assembly : AssemblyVersion("1.0.*")] |
diff --git a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs index f42fdf6..27ae490 100644 --- a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs +++ b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs | |||
@@ -81,6 +81,8 @@ namespace OpenSim.Region.Physics.BulletXPlugin | |||
81 | /// </summary> | 81 | /// </summary> |
82 | public class BulletXMaths | 82 | public class BulletXMaths |
83 | { | 83 | { |
84 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
85 | |||
84 | //Vector3 | 86 | //Vector3 |
85 | public static Vector3 PhysicsVectorToXnaVector3(PhysicsVector physicsVector) | 87 | public static Vector3 PhysicsVectorToXnaVector3(PhysicsVector physicsVector) |
86 | { | 88 | { |
@@ -311,7 +313,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin | |||
311 | 313 | ||
312 | bool needsCollision = base.NeedsCollision(bodyA, bodyB); | 314 | bool needsCollision = base.NeedsCollision(bodyA, bodyB); |
313 | 315 | ||
314 | //MainLog.Instance.Debug("BulletX", "A collision was detected between {0} and {1} --> {2}", nameA, nameB, | 316 | //m_log.Debug("[BulletX]: A collision was detected between {0} and {1} --> {2}", nameA, nameB, |
315 | //needsCollision); | 317 | //needsCollision); |
316 | 318 | ||
317 | 319 | ||
diff --git a/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs b/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs index a4ac54f..acaa389b 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs | |||
@@ -38,6 +38,8 @@ namespace OpenSim.Region.Physics.Manager | |||
38 | /// </summary> | 38 | /// </summary> |
39 | public class PhysicsPluginManager | 39 | public class PhysicsPluginManager |
40 | { | 40 | { |
41 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
42 | |||
41 | private Dictionary<string, IPhysicsPlugin> _PhysPlugins = new Dictionary<string, IPhysicsPlugin>(); | 43 | private Dictionary<string, IPhysicsPlugin> _PhysPlugins = new Dictionary<string, IPhysicsPlugin>(); |
42 | private Dictionary<string, IMeshingPlugin> _MeshPlugins = new Dictionary<string, IMeshingPlugin>(); | 44 | private Dictionary<string, IMeshingPlugin> _MeshPlugins = new Dictionary<string, IMeshingPlugin>(); |
43 | 45 | ||
@@ -60,25 +62,25 @@ namespace OpenSim.Region.Physics.Manager | |||
60 | IMesher meshEngine = null; | 62 | IMesher meshEngine = null; |
61 | if (_MeshPlugins.ContainsKey(meshEngineName)) | 63 | if (_MeshPlugins.ContainsKey(meshEngineName)) |
62 | { | 64 | { |
63 | MainLog.Instance.Verbose("PHYSICS", "creating meshing engine " + meshEngineName); | 65 | m_log.Info("[PHYSICS]: creating meshing engine " + meshEngineName); |
64 | meshEngine = _MeshPlugins[meshEngineName].GetMesher(); | 66 | meshEngine = _MeshPlugins[meshEngineName].GetMesher(); |
65 | } | 67 | } |
66 | else | 68 | else |
67 | { | 69 | { |
68 | MainLog.Instance.Warn("PHYSICS", "couldn't find meshingEngine: {0}", meshEngineName); | 70 | m_log.Warn(String.Format("[PHYSICS]: couldn't find meshingEngine: {0}", meshEngineName)); |
69 | throw new ArgumentException(String.Format("couldn't find meshingEngine: {0}", meshEngineName)); | 71 | throw new ArgumentException(String.Format("couldn't find meshingEngine: {0}", meshEngineName)); |
70 | } | 72 | } |
71 | 73 | ||
72 | if (_PhysPlugins.ContainsKey(physEngineName)) | 74 | if (_PhysPlugins.ContainsKey(physEngineName)) |
73 | { | 75 | { |
74 | MainLog.Instance.Verbose("PHYSICS", "creating " + physEngineName); | 76 | m_log.Info("[PHYSICS]: creating " + physEngineName); |
75 | PhysicsScene result = _PhysPlugins[physEngineName].GetScene(); | 77 | PhysicsScene result = _PhysPlugins[physEngineName].GetScene(); |
76 | result.Initialise(meshEngine); | 78 | result.Initialise(meshEngine); |
77 | return result; | 79 | return result; |
78 | } | 80 | } |
79 | else | 81 | else |
80 | { | 82 | { |
81 | MainLog.Instance.Warn("PHYSICS", "couldn't find physicsEngine: {0}", physEngineName); | 83 | m_log.Warn(String.Format("[PHYSICS]: couldn't find physicsEngine: {0}", physEngineName)); |
82 | throw new ArgumentException(String.Format("couldn't find physicsEngine: {0}", physEngineName)); | 84 | throw new ArgumentException(String.Format("couldn't find physicsEngine: {0}", physEngineName)); |
83 | } | 85 | } |
84 | } | 86 | } |
@@ -89,7 +91,7 @@ namespace OpenSim.Region.Physics.Manager | |||
89 | IMeshingPlugin plugHard; | 91 | IMeshingPlugin plugHard; |
90 | plugHard = new ZeroMesherPlugin(); | 92 | plugHard = new ZeroMesherPlugin(); |
91 | _MeshPlugins.Add(plugHard.GetName(), plugHard); | 93 | _MeshPlugins.Add(plugHard.GetName(), plugHard); |
92 | MainLog.Instance.Verbose("PHYSICS", "Added meshing engine: " + plugHard.GetName()); | 94 | m_log.Info("[PHYSICS]: Added meshing engine: " + plugHard.GetName()); |
93 | 95 | ||
94 | // And now walk all assemblies (DLLs effectively) and see if they are home | 96 | // And now walk all assemblies (DLLs effectively) and see if they are home |
95 | // of a plugin that is of interest for us | 97 | // of a plugin that is of interest for us |
@@ -120,7 +122,7 @@ namespace OpenSim.Region.Physics.Manager | |||
120 | (IPhysicsPlugin) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | 122 | (IPhysicsPlugin) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); |
121 | plug.Init(); | 123 | plug.Init(); |
122 | _PhysPlugins.Add(plug.GetName(), plug); | 124 | _PhysPlugins.Add(plug.GetName(), plug); |
123 | MainLog.Instance.Verbose("PHYSICS", "Added physics engine: " + plug.GetName()); | 125 | m_log.Info("[PHYSICS]: Added physics engine: " + plug.GetName()); |
124 | } | 126 | } |
125 | 127 | ||
126 | Type meshTypeInterface = pluginType.GetInterface("IMeshingPlugin", true); | 128 | Type meshTypeInterface = pluginType.GetInterface("IMeshingPlugin", true); |
@@ -130,7 +132,7 @@ namespace OpenSim.Region.Physics.Manager | |||
130 | IMeshingPlugin plug = | 132 | IMeshingPlugin plug = |
131 | (IMeshingPlugin) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | 133 | (IMeshingPlugin) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); |
132 | _MeshPlugins.Add(plug.GetName(), plug); | 134 | _MeshPlugins.Add(plug.GetName(), plug); |
133 | MainLog.Instance.Verbose("PHYSICS", "Added meshing engine: " + plug.GetName()); | 135 | m_log.Info("[PHYSICS]: Added meshing engine: " + plug.GetName()); |
134 | } | 136 | } |
135 | 137 | ||
136 | physTypeInterface = null; | 138 | physTypeInterface = null; |
@@ -147,11 +149,11 @@ namespace OpenSim.Region.Physics.Manager | |||
147 | { | 149 | { |
148 | if (isWarning) | 150 | if (isWarning) |
149 | { | 151 | { |
150 | MainLog.Instance.Warn("PHYSICS", message); | 152 | m_log.Warn("[PHYSICS]: " + message); |
151 | } | 153 | } |
152 | else | 154 | else |
153 | { | 155 | { |
154 | MainLog.Instance.Verbose("PHYSICS", message); | 156 | m_log.Info("[PHYSICS]: " + message); |
155 | } | 157 | } |
156 | } | 158 | } |
157 | 159 | ||
@@ -171,4 +173,4 @@ namespace OpenSim.Region.Physics.Manager | |||
171 | string GetName(); | 173 | string GetName(); |
172 | IMesher GetMesher(); | 174 | IMesher GetMesher(); |
173 | } | 175 | } |
174 | } \ No newline at end of file | 176 | } |
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs index 37481f1..bd2ad99 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs | |||
@@ -25,6 +25,7 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System; | ||
28 | using Axiom.Math; | 29 | using Axiom.Math; |
29 | using OpenSim.Framework; | 30 | using OpenSim.Framework; |
30 | using OpenSim.Framework.Console; | 31 | using OpenSim.Framework.Console; |
@@ -35,6 +36,8 @@ namespace OpenSim.Region.Physics.Manager | |||
35 | 36 | ||
36 | public abstract class PhysicsScene | 37 | public abstract class PhysicsScene |
37 | { | 38 | { |
39 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
40 | |||
38 | // The only thing that should register for this event is the InnerScene | 41 | // The only thing that should register for this event is the InnerScene |
39 | // Anything else could cause problems. | 42 | // Anything else could cause problems. |
40 | 43 | ||
@@ -92,7 +95,7 @@ namespace OpenSim.Region.Physics.Manager | |||
92 | 95 | ||
93 | public override PhysicsActor AddAvatar(string avName, PhysicsVector position) | 96 | public override PhysicsActor AddAvatar(string avName, PhysicsVector position) |
94 | { | 97 | { |
95 | MainLog.Instance.Verbose("PHYSICS", "NullPhysicsScene : AddAvatar({0})", position); | 98 | m_log.Info(String.Format("[PHYSICS]: NullPhysicsScene : AddAvatar({0})", position)); |
96 | return PhysicsActor.Null; | 99 | return PhysicsActor.Null; |
97 | } | 100 | } |
98 | 101 | ||
@@ -107,7 +110,7 @@ namespace OpenSim.Region.Physics.Manager | |||
107 | /* | 110 | /* |
108 | public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size, Quaternion rotation) | 111 | public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size, Quaternion rotation) |
109 | { | 112 | { |
110 | MainLog.Instance.Verbose("NullPhysicsScene : AddPrim({0},{1})", position, size); | 113 | m_log.Info(String.Format("NullPhysicsScene : AddPrim({0},{1})", position, size)); |
111 | return PhysicsActor.Null; | 114 | return PhysicsActor.Null; |
112 | } | 115 | } |
113 | */ | 116 | */ |
@@ -121,7 +124,7 @@ namespace OpenSim.Region.Physics.Manager | |||
121 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, | 124 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, |
122 | PhysicsVector size, Quaternion rotation, bool isPhysical) | 125 | PhysicsVector size, Quaternion rotation, bool isPhysical) |
123 | { | 126 | { |
124 | MainLog.Instance.Verbose("PHYSICS", "NullPhysicsScene : AddPrim({0},{1})", position, size); | 127 | m_log.Info(String.Format("[PHYSICS]: NullPhysicsScene : AddPrim({0},{1})", position, size)); |
125 | return PhysicsActor.Null; | 128 | return PhysicsActor.Null; |
126 | } | 129 | } |
127 | 130 | ||
@@ -131,20 +134,19 @@ namespace OpenSim.Region.Physics.Manager | |||
131 | 134 | ||
132 | public override float Simulate(float timeStep) | 135 | public override float Simulate(float timeStep) |
133 | { | 136 | { |
134 | m_workIndicator = (m_workIndicator + 1)%10; | 137 | m_workIndicator = (m_workIndicator + 1) % 10; |
135 | 138 | ||
136 | //MainLog.Instance.SetStatus(m_workIndicator.ToString()); | ||
137 | return 0f; | 139 | return 0f; |
138 | } | 140 | } |
139 | 141 | ||
140 | public override void GetResults() | 142 | public override void GetResults() |
141 | { | 143 | { |
142 | MainLog.Instance.Verbose("PHYSICS", "NullPhysicsScene : GetResults()"); | 144 | m_log.Info("[PHYSICS]: NullPhysicsScene : GetResults()"); |
143 | } | 145 | } |
144 | 146 | ||
145 | public override void SetTerrain(float[] heightMap) | 147 | public override void SetTerrain(float[] heightMap) |
146 | { | 148 | { |
147 | MainLog.Instance.Verbose("PHYSICS", "NullPhysicsScene : SetTerrain({0} items)", heightMap.Length); | 149 | m_log.Info(String.Format("[PHYSICS]: NullPhysicsScene : SetTerrain({0} items)", heightMap.Length)); |
148 | } | 150 | } |
149 | 151 | ||
150 | public override void DeleteTerrain() | 152 | public override void DeleteTerrain() |
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index 3217dd8..d4c9926 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs | |||
@@ -53,6 +53,8 @@ namespace OpenSim.Region.Physics.Meshing | |||
53 | 53 | ||
54 | public class Meshmerizer : IMesher | 54 | public class Meshmerizer : IMesher |
55 | { | 55 | { |
56 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
57 | |||
56 | // Setting baseDir to a path will enable the dumping of raw files | 58 | // Setting baseDir to a path will enable the dumping of raw files |
57 | // raw files can be imported by blender so a visual inspection of the results can be done | 59 | // raw files can be imported by blender so a visual inspection of the results can be done |
58 | // const string baseDir = "rawFiles"; | 60 | // const string baseDir = "rawFiles"; |
@@ -101,7 +103,6 @@ namespace OpenSim.Region.Physics.Meshing | |||
101 | return influenced; | 103 | return influenced; |
102 | } | 104 | } |
103 | 105 | ||
104 | |||
105 | private static void InsertVertices(List<Vertex> vertices, int usedForSeed, List<Triangle> triangles) | 106 | private static void InsertVertices(List<Vertex> vertices, int usedForSeed, List<Triangle> triangles) |
106 | { | 107 | { |
107 | // This is a variant of the delaunay algorithm | 108 | // This is a variant of the delaunay algorithm |
@@ -174,7 +175,6 @@ namespace OpenSim.Region.Physics.Meshing | |||
174 | } | 175 | } |
175 | } | 176 | } |
176 | 177 | ||
177 | |||
178 | private static Mesh CreateBoxMesh(String primName, PrimitiveBaseShape primShape, PhysicsVector size) | 178 | private static Mesh CreateBoxMesh(String primName, PrimitiveBaseShape primShape, PhysicsVector size) |
179 | // Builds the z (+ and -) surfaces of a box shaped prim | 179 | // Builds the z (+ and -) surfaces of a box shaped prim |
180 | { | 180 | { |
@@ -236,7 +236,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
236 | // Calculated separately to avoid errors | 236 | // Calculated separately to avoid errors |
237 | cutHull.AddVertex(legEnd); | 237 | cutHull.AddVertex(legEnd); |
238 | 238 | ||
239 | MainLog.Instance.Debug("Starting cutting of the hollow shape from the prim {1}", 0, primName); | 239 | m_log.Debug(String.Format("Starting cutting of the hollow shape from the prim {1}", 0, primName)); |
240 | SimpleHull cuttedHull = SimpleHull.SubtractHull(outerHull, cutHull); | 240 | SimpleHull cuttedHull = SimpleHull.SubtractHull(outerHull, cutHull); |
241 | 241 | ||
242 | outerHull = cuttedHull; | 242 | outerHull = cuttedHull; |
diff --git a/OpenSim/Region/Physics/Meshing/SimpleHull.cs b/OpenSim/Region/Physics/Meshing/SimpleHull.cs index 4532bda..9209860 100644 --- a/OpenSim/Region/Physics/Meshing/SimpleHull.cs +++ b/OpenSim/Region/Physics/Meshing/SimpleHull.cs | |||
@@ -42,6 +42,8 @@ namespace OpenSim.Region.Physics.Meshing | |||
42 | // is defined by the hull lies inside or outside the simplex chain | 42 | // is defined by the hull lies inside or outside the simplex chain |
43 | public class SimpleHull | 43 | public class SimpleHull |
44 | { | 44 | { |
45 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
46 | |||
45 | private List<Vertex> vertices = new List<Vertex>(); | 47 | private List<Vertex> vertices = new List<Vertex>(); |
46 | private List<Vertex> holeVertices = new List<Vertex>(); // Only used, when the hull is hollow | 48 | private List<Vertex> holeVertices = new List<Vertex>(); // Only used, when the hull is hollow |
47 | 49 | ||
@@ -243,9 +245,9 @@ namespace OpenSim.Region.Physics.Meshing | |||
243 | SimpleHull otherHullClone = otherHull.Clone(); | 245 | SimpleHull otherHullClone = otherHull.Clone(); |
244 | bool intersects = false; | 246 | bool intersects = false; |
245 | 247 | ||
246 | MainLog.Instance.Debug("State before intersection detection"); | 248 | m_log.Debug("State before intersection detection"); |
247 | MainLog.Instance.Debug("The baseHull is:\n{1}", 0, baseHullClone.ToString()); | 249 | m_log.Debug(String.Format("The baseHull is:\n{1}", 0, baseHullClone.ToString())); |
248 | MainLog.Instance.Debug("The otherHull is:\n{1}", 0, otherHullClone.ToString()); | 250 | m_log.Debug(String.Format("The otherHull is:\n{1}", 0, otherHullClone.ToString())); |
249 | 251 | ||
250 | { | 252 | { |
251 | int iBase, iOther; | 253 | int iBase, iOther; |
@@ -274,8 +276,8 @@ namespace OpenSim.Region.Physics.Meshing | |||
274 | } | 276 | } |
275 | } | 277 | } |
276 | 278 | ||
277 | MainLog.Instance.Debug("State after intersection detection for the base hull"); | 279 | m_log.Debug("State after intersection detection for the base hull"); |
278 | MainLog.Instance.Debug("The baseHull is:\n{1}", 0, baseHullClone.ToString()); | 280 | m_log.Debug(String.Format("The baseHull is:\n{1}", 0, baseHullClone.ToString())); |
279 | 281 | ||
280 | { | 282 | { |
281 | int iOther, iBase; | 283 | int iOther, iBase; |
@@ -303,8 +305,8 @@ namespace OpenSim.Region.Physics.Meshing | |||
303 | } | 305 | } |
304 | } | 306 | } |
305 | 307 | ||
306 | MainLog.Instance.Debug("State after intersection detection for the base hull"); | 308 | m_log.Debug("State after intersection detection for the base hull"); |
307 | MainLog.Instance.Debug("The otherHull is:\n{1}", 0, otherHullClone.ToString()); | 309 | m_log.Debug(String.Format("The otherHull is:\n{1}", 0, otherHullClone.ToString())); |
308 | 310 | ||
309 | 311 | ||
310 | bool otherIsInBase = baseHullClone.containsPointsFrom(otherHullClone); | 312 | bool otherIsInBase = baseHullClone.containsPointsFrom(otherHullClone); |
@@ -387,7 +389,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
387 | done = true; | 389 | done = true; |
388 | } | 390 | } |
389 | 391 | ||
390 | MainLog.Instance.Debug("The resulting Hull is:\n{1}", 0, result.ToString()); | 392 | m_log.Debug(String.Format("The resulting Hull is:\n{1}", 0, result.ToString())); |
391 | 393 | ||
392 | return result; | 394 | return result; |
393 | } | 395 | } |
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs index a21b7eb..98069a0 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | |||
@@ -56,6 +56,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
56 | } | 56 | } |
57 | public class OdeCharacter : PhysicsActor | 57 | public class OdeCharacter : PhysicsActor |
58 | { | 58 | { |
59 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
60 | |||
59 | private PhysicsVector _position; | 61 | private PhysicsVector _position; |
60 | private d.Vector3 _zeroPosition; | 62 | private d.Vector3 _zeroPosition; |
61 | private d.Matrix3 m_StandUpRotation; | 63 | private d.Matrix3 m_StandUpRotation; |
@@ -357,7 +359,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
357 | //capsuleradius = 0.2f; | 359 | //capsuleradius = 0.2f; |
358 | 360 | ||
359 | CAPSULE_LENGTH = (SetSize.Z - ((SetSize.Z*0.52f))); // subtract 43% of the size | 361 | CAPSULE_LENGTH = (SetSize.Z - ((SetSize.Z*0.52f))); // subtract 43% of the size |
360 | OpenSim.Framework.Console.MainLog.Instance.Verbose("SIZE", CAPSULE_LENGTH.ToString()); | 362 | m_log.Info("[SIZE]: " + CAPSULE_LENGTH.ToString()); |
361 | d.BodyDestroy(Body); | 363 | d.BodyDestroy(Body); |
362 | 364 | ||
363 | _parent_scene.waitForSpaceUnlock(_parent_scene.space); | 365 | _parent_scene.waitForSpaceUnlock(_parent_scene.space); |
@@ -440,7 +442,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
440 | //d.QfromR( | 442 | //d.QfromR( |
441 | //d.Matrix3 checkrotation = new d.Matrix3(0.7071068,0.5, -0.7071068, | 443 | //d.Matrix3 checkrotation = new d.Matrix3(0.7071068,0.5, -0.7071068, |
442 | // | 444 | // |
443 | //OpenSim.Framework.Console.MainLog.Instance.Verbose("PHYSICSAV", "Rotation: " + bodyrotation.M00 + " : " + bodyrotation.M01 + " : " + bodyrotation.M02 + " : " + bodyrotation.M10 + " : " + bodyrotation.M11 + " : " + bodyrotation.M12 + " : " + bodyrotation.M20 + " : " + bodyrotation.M21 + " : " + bodyrotation.M22); | 445 | //m_log.Info("[PHYSICSAV]: Rotation: " + bodyrotation.M00 + " : " + bodyrotation.M01 + " : " + bodyrotation.M02 + " : " + bodyrotation.M10 + " : " + bodyrotation.M11 + " : " + bodyrotation.M12 + " : " + bodyrotation.M20 + " : " + bodyrotation.M21 + " : " + bodyrotation.M22); |
444 | //standupStraight(); | 446 | //standupStraight(); |
445 | 447 | ||
446 | 448 | ||
@@ -479,7 +481,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
479 | d.BodyAddForceAtRelPos(Body, 0.0f, 0.0f, servo, 0.0f, 0.0f, 1.0f); | 481 | d.BodyAddForceAtRelPos(Body, 0.0f, 0.0f, servo, 0.0f, 0.0f, 1.0f); |
480 | d.BodyAddForceAtRelPos(Body, 0.0f, 0.0f, -servo, 0.0f, 0.0f, -1.0f); | 482 | d.BodyAddForceAtRelPos(Body, 0.0f, 0.0f, -servo, 0.0f, 0.0f, -1.0f); |
481 | //d.Matrix3 bodyrotation = d.BodyGetRotation(Body); | 483 | //d.Matrix3 bodyrotation = d.BodyGetRotation(Body); |
482 | //OpenSim.Framework.Console.MainLog.Instance.Verbose("PHYSICSAV", "Rotation: " + bodyrotation.M00 + " : " + bodyrotation.M01 + " : " + bodyrotation.M02 + " : " + bodyrotation.M10 + " : " + bodyrotation.M11 + " : " + bodyrotation.M12 + " : " + bodyrotation.M20 + " : " + bodyrotation.M21 + " : " + bodyrotation.M22); | 484 | //m_log.Info("[PHYSICSAV]: Rotation: " + bodyrotation.M00 + " : " + bodyrotation.M01 + " : " + bodyrotation.M02 + " : " + bodyrotation.M10 + " : " + bodyrotation.M11 + " : " + bodyrotation.M12 + " : " + bodyrotation.M20 + " : " + bodyrotation.M21 + " : " + bodyrotation.M22); |
483 | } | 485 | } |
484 | 486 | ||
485 | public override PhysicsVector Force | 487 | public override PhysicsVector Force |
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 93ba29e..690e9d3 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | |||
@@ -37,6 +37,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
37 | { | 37 | { |
38 | public class OdePrim : PhysicsActor | 38 | public class OdePrim : PhysicsActor |
39 | { | 39 | { |
40 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
41 | |||
40 | public PhysicsVector _position; | 42 | public PhysicsVector _position; |
41 | private PhysicsVector _velocity; | 43 | private PhysicsVector _velocity; |
42 | private PhysicsVector m_lastVelocity = new PhysicsVector(0.0f, 0.0f, 0.0f); | 44 | private PhysicsVector m_lastVelocity = new PhysicsVector(0.0f, 0.0f, 0.0f); |
@@ -530,7 +532,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
530 | } | 532 | } |
531 | else | 533 | else |
532 | { | 534 | { |
533 | OpenSim.Framework.Console.MainLog.Instance.Verbose("PHYSICS", "Failed to load a sphere bad size"); | 535 | m_log.Info("[PHYSICS]: Failed to load a sphere bad size"); |
534 | _parent_scene.waitForSpaceUnlock(m_targetSpace); | 536 | _parent_scene.waitForSpaceUnlock(m_targetSpace); |
535 | prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z); | 537 | prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z); |
536 | } | 538 | } |
@@ -683,7 +685,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
683 | { | 685 | { |
684 | lock (m_forcelist) | 686 | lock (m_forcelist) |
685 | { | 687 | { |
686 | //OpenSim.Framework.Console.MainLog.Instance.Verbose("PHYSICS", "dequeing forcelist"); | 688 | //m_log.Info("[PHYSICS]: dequeing forcelist"); |
687 | if (IsPhysical) | 689 | if (IsPhysical) |
688 | { | 690 | { |
689 | PhysicsVector iforce = new PhysicsVector(); | 691 | PhysicsVector iforce = new PhysicsVector(); |
@@ -747,7 +749,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
747 | get { return _position; } | 749 | get { return _position; } |
748 | 750 | ||
749 | set { _position = value; | 751 | set { _position = value; |
750 | //OpenSim.Framework.Console.MainLog.Instance.Verbose("PHYSICS", _position.ToString()); | 752 | //m_log.Info("[PHYSICS]: " + _position.ToString()); |
751 | } | 753 | } |
752 | } | 754 | } |
753 | 755 | ||
@@ -824,7 +826,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
824 | { | 826 | { |
825 | m_forcelist.Add(force); | 827 | m_forcelist.Add(force); |
826 | m_taintforce = true; | 828 | m_taintforce = true; |
827 | //OpenSim.Framework.Console.MainLog.Instance.Verbose("PHYSICS", "Added Force:" + force.ToString() + " to prim at " + Position.ToString()); | 829 | //m_log.Info("[PHYSICS]: Added Force:" + force.ToString() + " to prim at " + Position.ToString()); |
828 | } | 830 | } |
829 | 831 | ||
830 | public override PhysicsVector RotationalVelocity | 832 | public override PhysicsVector RotationalVelocity |
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index bff2c80..9cf6d50 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | |||
@@ -44,6 +44,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
44 | /// </summary> | 44 | /// </summary> |
45 | public class OdePlugin : IPhysicsPlugin | 45 | public class OdePlugin : IPhysicsPlugin |
46 | { | 46 | { |
47 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
48 | |||
47 | private OdeScene _mScene; | 49 | private OdeScene _mScene; |
48 | 50 | ||
49 | public OdePlugin() | 51 | public OdePlugin() |
@@ -76,6 +78,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
76 | 78 | ||
77 | public class OdeScene : PhysicsScene | 79 | public class OdeScene : PhysicsScene |
78 | { | 80 | { |
81 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
82 | |||
79 | // TODO: this should be hard-coded in some common place | 83 | // TODO: this should be hard-coded in some common place |
80 | private const uint m_regionWidth = 256; | 84 | private const uint m_regionWidth = 256; |
81 | private const uint m_regionHeight = 256; | 85 | private const uint m_regionHeight = 256; |
@@ -284,7 +288,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
284 | 288 | ||
285 | //if (id == d.GeomClassID.TriMeshClass) | 289 | //if (id == d.GeomClassID.TriMeshClass) |
286 | //{ | 290 | //{ |
287 | // MainLog.Instance.Verbose("near: A collision was detected between {1} and {2}", 0, name1, name2); | 291 | // m_log.Info("near: A collision was detected between {1} and {2}", 0, name1, name2); |
288 | //System.Console.WriteLine("near: A collision was detected between {1} and {2}", 0, name1, name2); | 292 | //System.Console.WriteLine("near: A collision was detected between {1} and {2}", 0, name1, name2); |
289 | //} | 293 | //} |
290 | 294 | ||
@@ -296,8 +300,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
296 | } | 300 | } |
297 | catch (SEHException) | 301 | catch (SEHException) |
298 | { | 302 | { |
299 | MainLog.Instance.Error("PHYSICS", | 303 | m_log.Error("[PHYSICS]: The Operating system shut down ODE because of corrupt memory. This could be a result of really irregular terrain. If this repeats continuously, restart using Basic Physics and terrain fill your terrain. Restarting the sim."); |
300 | "The Operating system shut down ODE because of corrupt memory. This could be a result of really irregular terrain. If this repeats continuously, restart using Basic Physics and terrain fill your terrain. Restarting the sim."); | ||
301 | base.TriggerPhysicsBasedRestart(); | 304 | base.TriggerPhysicsBasedRestart(); |
302 | } | 305 | } |
303 | 306 | ||
@@ -352,7 +355,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
352 | 355 | ||
353 | if (contacts[i].depth >= 1.00f) | 356 | if (contacts[i].depth >= 1.00f) |
354 | { | 357 | { |
355 | //MainLog.Instance.Debug("PHYSICS",contacts[i].depth.ToString()); | 358 | //m_log.Debug("[PHYSICS]: " +contacts[i].depth.ToString()); |
356 | } | 359 | } |
357 | 360 | ||
358 | //If you interpenetrate a prim with an agent | 361 | //If you interpenetrate a prim with an agent |
@@ -405,7 +408,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
405 | } | 408 | } |
406 | if (contacts[i].depth >= 1.00f) | 409 | if (contacts[i].depth >= 1.00f) |
407 | { | 410 | { |
408 | //OpenSim.Framework.Console.MainLog.Instance.Verbose("P", contacts[i].depth.ToString()); | 411 | //m_log.Info("[P]: " + contacts[i].depth.ToString()); |
409 | if ((p2.PhysicsActorType == (int) ActorTypes.Agent && | 412 | if ((p2.PhysicsActorType == (int) ActorTypes.Agent && |
410 | p1.PhysicsActorType == (int) ActorTypes.Unknown) || | 413 | p1.PhysicsActorType == (int) ActorTypes.Unknown) || |
411 | (p1.PhysicsActorType == (int) ActorTypes.Agent && | 414 | (p1.PhysicsActorType == (int) ActorTypes.Agent && |
@@ -654,9 +657,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
654 | } | 657 | } |
655 | else | 658 | else |
656 | { | 659 | { |
657 | MainLog.Instance.Verbose("Physics", | 660 | m_log.Info("[Physics]: Invalid Scene passed to 'removeprim from scene':" + |
658 | "Invalid Scene passed to 'removeprim from scene':" + | 661 | ((OdePrim) prim).m_targetSpace.ToString()); |
659 | ((OdePrim) prim).m_targetSpace.ToString()); | ||
660 | } | 662 | } |
661 | } | 663 | } |
662 | } | 664 | } |
@@ -678,9 +680,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
678 | } | 680 | } |
679 | else | 681 | else |
680 | { | 682 | { |
681 | MainLog.Instance.Verbose("Physics", | 683 | m_log.Info("[Physics]: Invalid Scene passed to 'removeprim from scene':" + |
682 | "Invalid Scene passed to 'removeprim from scene':" + | 684 | ((OdePrim) prim).m_targetSpace.ToString()); |
683 | ((OdePrim) prim).m_targetSpace.ToString()); | ||
684 | } | 685 | } |
685 | } | 686 | } |
686 | } | 687 | } |
@@ -742,9 +743,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
742 | } | 743 | } |
743 | else | 744 | else |
744 | { | 745 | { |
745 | MainLog.Instance.Verbose("Physics", | 746 | m_log.Info("[Physics]: Invalid Scene passed to 'recalculatespace':" + currentspace.ToString() + |
746 | "Invalid Scene passed to 'recalculatespace':" + currentspace.ToString() + | 747 | " Geom:" + geom.ToString()); |
747 | " Geom:" + geom.ToString()); | ||
748 | } | 748 | } |
749 | } | 749 | } |
750 | else | 750 | else |
@@ -761,9 +761,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
761 | } | 761 | } |
762 | else | 762 | else |
763 | { | 763 | { |
764 | MainLog.Instance.Verbose("Physics", | 764 | m_log.Info("[Physics]: Invalid Scene passed to 'recalculatespace':" + |
765 | "Invalid Scene passed to 'recalculatespace':" + | 765 | sGeomIsIn.ToString() + " Geom:" + geom.ToString()); |
766 | sGeomIsIn.ToString() + " Geom:" + geom.ToString()); | ||
767 | } | 766 | } |
768 | } | 767 | } |
769 | } | 768 | } |
@@ -787,9 +786,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
787 | } | 786 | } |
788 | else | 787 | else |
789 | { | 788 | { |
790 | MainLog.Instance.Verbose("Physics", | 789 | m_log.Info("[Physics]: Invalid Scene passed to 'recalculatespace':" + |
791 | "Invalid Scene passed to 'recalculatespace':" + | 790 | currentspace.ToString() + " Geom:" + geom.ToString()); |
792 | currentspace.ToString() + " Geom:" + geom.ToString()); | ||
793 | } | 791 | } |
794 | } | 792 | } |
795 | } | 793 | } |
@@ -807,9 +805,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
807 | } | 805 | } |
808 | else | 806 | else |
809 | { | 807 | { |
810 | MainLog.Instance.Verbose("Physics", | 808 | m_log.Info("[Physics]: Invalid Scene passed to 'recalculatespace':" + |
811 | "Invalid Scene passed to 'recalculatespace':" + | 809 | currentspace.ToString() + " Geom:" + geom.ToString()); |
812 | currentspace.ToString() + " Geom:" + geom.ToString()); | ||
813 | } | 810 | } |
814 | } | 811 | } |
815 | else | 812 | else |
@@ -826,9 +823,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
826 | } | 823 | } |
827 | else | 824 | else |
828 | { | 825 | { |
829 | MainLog.Instance.Verbose("Physics", | 826 | m_log.Info("[Physics]: Invalid Scene passed to 'recalculatespace':" + |
830 | "Invalid Scene passed to 'recalculatespace':" + | 827 | sGeomIsIn.ToString() + " Geom:" + geom.ToString()); |
831 | sGeomIsIn.ToString() + " Geom:" + geom.ToString()); | ||
832 | } | 828 | } |
833 | } | 829 | } |
834 | } | 830 | } |
@@ -876,7 +872,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
876 | IntPtr locationbasedspace =IntPtr.Zero; | 872 | IntPtr locationbasedspace =IntPtr.Zero; |
877 | 873 | ||
878 | int[] xyspace = calculateSpaceArrayItemFromPos(pos); | 874 | int[] xyspace = calculateSpaceArrayItemFromPos(pos); |
879 | //MainLog.Instance.Verbose("Physics", "Attempting to use arrayItem: " + xyspace[0].ToString() + "," + xyspace[1].ToString()); | 875 | //m_log.Info("[Physics]: Attempting to use arrayItem: " + xyspace[0].ToString() + "," + xyspace[1].ToString()); |
880 | locationbasedspace = staticPrimspace[xyspace[0], xyspace[1]]; | 876 | locationbasedspace = staticPrimspace[xyspace[0], xyspace[1]]; |
881 | 877 | ||
882 | //locationbasedspace = space; | 878 | //locationbasedspace = space; |
@@ -970,7 +966,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
970 | name2 = "null"; | 966 | name2 = "null"; |
971 | } | 967 | } |
972 | 968 | ||
973 | MainLog.Instance.Verbose("TriArrayCallback: A collision was detected between {1} and {2}", 0, name1, name2); | 969 | m_log.Info("TriArrayCallback: A collision was detected between {1} and {2}", 0, name1, name2); |
974 | */ | 970 | */ |
975 | return 1; | 971 | return 1; |
976 | } | 972 | } |
@@ -984,19 +980,20 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
984 | { | 980 | { |
985 | name1 = "null"; | 981 | name1 = "null"; |
986 | } | 982 | } |
983 | |||
987 | if (!geom_name_map.TryGetValue(refObject, out name2)) | 984 | if (!geom_name_map.TryGetValue(refObject, out name2)) |
988 | { | 985 | { |
989 | name2 = "null"; | 986 | name2 = "null"; |
990 | } | 987 | } |
991 | 988 | ||
992 | // MainLog.Instance.Verbose("TriCallback: A collision was detected between {1} and {2}. Index was {3}", 0, name1, name2, triangleIndex); | 989 | // m_log.Info("TriCallback: A collision was detected between {1} and {2}. Index was {3}", 0, name1, name2, triangleIndex); |
993 | 990 | ||
994 | d.Vector3 v0 = new d.Vector3(); | 991 | d.Vector3 v0 = new d.Vector3(); |
995 | d.Vector3 v1 = new d.Vector3(); | 992 | d.Vector3 v1 = new d.Vector3(); |
996 | d.Vector3 v2 = new d.Vector3(); | 993 | d.Vector3 v2 = new d.Vector3(); |
997 | 994 | ||
998 | d.GeomTriMeshGetTriangle(trimesh, 0, ref v0, ref v1, ref v2); | 995 | d.GeomTriMeshGetTriangle(trimesh, 0, ref v0, ref v1, ref v2); |
999 | // MainLog.Instance.Debug("Triangle {0} is <{1},{2},{3}>, <{4},{5},{6}>, <{7},{8},{9}>", triangleIndex, v0.X, v0.Y, v0.Z, v1.X, v1.Y, v1.Z, v2.X, v2.Y, v2.Z); | 996 | // m_log.Debug("Triangle {0} is <{1},{2},{3}>, <{4},{5},{6}>, <{7},{8},{9}>", triangleIndex, v0.X, v0.Y, v0.Z, v1.X, v1.Y, v1.Z, v2.X, v2.Y, v2.Z); |
1000 | 997 | ||
1001 | return 1; | 998 | return 1; |
1002 | } | 999 | } |
@@ -1105,19 +1102,16 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1105 | } | 1102 | } |
1106 | catch (StackOverflowException) | 1103 | catch (StackOverflowException) |
1107 | { | 1104 | { |
1108 | MainLog.Instance.Error("PHYSICS", | 1105 | m_log.Error("[PHYSICS]: The operating system wasn't able to allocate enough memory for the simulation. Restarting the sim."); |
1109 | "The operating system wasn't able to allocate enough memory for the simulation. Restarting the sim."); | ||
1110 | base.TriggerPhysicsBasedRestart(); | 1106 | base.TriggerPhysicsBasedRestart(); |
1111 | } | 1107 | } |
1112 | 1108 | ||
1113 | int i = 0; | 1109 | int i = 0; |
1114 | 1110 | ||
1115 | |||
1116 | // Figure out the Frames Per Second we're going at. | 1111 | // Figure out the Frames Per Second we're going at. |
1117 | //(step_time == 0.004f, there's 250 of those per second. Times the step time/step size | 1112 | //(step_time == 0.004f, there's 250 of those per second. Times the step time/step size |
1118 | fps = (step_time/ODE_STEPSIZE) * 1000; | 1113 | fps = (step_time/ODE_STEPSIZE) * 1000; |
1119 | 1114 | ||
1120 | |||
1121 | while (step_time > 0.0f) | 1115 | while (step_time > 0.0f) |
1122 | { | 1116 | { |
1123 | foreach (OdeCharacter actor in _characters) | 1117 | foreach (OdeCharacter actor in _characters) |
@@ -1126,7 +1120,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1126 | actor.collidelock = true; | 1120 | actor.collidelock = true; |
1127 | } | 1121 | } |
1128 | 1122 | ||
1129 | |||
1130 | collision_optimized(timeStep); | 1123 | collision_optimized(timeStep); |
1131 | d.WorldQuickStep(world, ODE_STEPSIZE); | 1124 | d.WorldQuickStep(world, ODE_STEPSIZE); |
1132 | d.JointGroupEmpty(contactgroup); | 1125 | d.JointGroupEmpty(contactgroup); |
@@ -1178,8 +1171,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1178 | 1171 | ||
1179 | public override bool IsThreaded | 1172 | public override bool IsThreaded |
1180 | { | 1173 | { |
1181 | get { return (false); // for now we won't be multithreaded | 1174 | // for now we won't be multithreaded |
1182 | } | 1175 | get { return (false); } |
1183 | } | 1176 | } |
1184 | public float[] ResizeTerrain512NearestNeighbour(float[] heightMap) | 1177 | public float[] ResizeTerrain512NearestNeighbour(float[] heightMap) |
1185 | { | 1178 | { |
@@ -1275,6 +1268,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1275 | } | 1268 | } |
1276 | } | 1269 | } |
1277 | } | 1270 | } |
1271 | |||
1278 | //Flatten out the array | 1272 | //Flatten out the array |
1279 | int i = 0; | 1273 | int i = 0; |
1280 | for (int y = 0; y < 512; y++) | 1274 | for (int y = 0; y < 512; y++) |
diff --git a/OpenSim/Region/Physics/POSPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/POSPlugin/AssemblyInfo.cs index 3bb71d4..da9f587 100644 --- a/OpenSim/Region/Physics/POSPlugin/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/POSPlugin/AssemblyInfo.cs | |||
@@ -55,4 +55,4 @@ using System.Runtime.InteropServices; | |||
55 | // You can specify all values by your own or you can build default build and revision | 55 | // You can specify all values by your own or you can build default build and revision |
56 | // numbers with the '*' character (the default): | 56 | // numbers with the '*' character (the default): |
57 | 57 | ||
58 | [assembly : AssemblyVersion("1.0.*")] \ No newline at end of file | 58 | [assembly : AssemblyVersion("1.0.*")] |
diff --git a/OpenSim/Region/Physics/PhysXPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/PhysXPlugin/AssemblyInfo.cs index 36cb952..8e6d2a6 100644 --- a/OpenSim/Region/Physics/PhysXPlugin/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/PhysXPlugin/AssemblyInfo.cs | |||
@@ -55,4 +55,4 @@ using System.Runtime.InteropServices; | |||
55 | // You can specify all values by your own or you can build default build and revision | 55 | // You can specify all values by your own or you can build default build and revision |
56 | // numbers with the '*' character (the default): | 56 | // numbers with the '*' character (the default): |
57 | 57 | ||
58 | [assembly : AssemblyVersion("1.0.*")] \ No newline at end of file | 58 | [assembly : AssemblyVersion("1.0.*")] |
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BaseClass.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BaseClass.cs index 8511b56..3a38497 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BaseClass.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BaseClass.cs | |||
@@ -41,7 +41,6 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
41 | { | 41 | { |
42 | public class LSL_BaseClass : MarshalByRefObject, LSL_BuiltIn_Commands_Interface, IScript | 42 | public class LSL_BaseClass : MarshalByRefObject, LSL_BuiltIn_Commands_Interface, IScript |
43 | { | 43 | { |
44 | |||
45 | // | 44 | // |
46 | // Included as base for any LSL-script that is compiled. | 45 | // Included as base for any LSL-script that is compiled. |
47 | // Any function added here will be accessible to the LSL script. But it must also be added to "LSL_BuiltIn_Commands_Interface" in "OpenSim.Region.ScriptEngine.Common" class. | 46 | // Any function added here will be accessible to the LSL script. But it must also be added to "LSL_BuiltIn_Commands_Interface" in "OpenSim.Region.ScriptEngine.Common" class. |
@@ -49,6 +48,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
49 | // Security note: This script will be running inside an restricted AppDomain. Currently AppDomain is not very restricted. | 48 | // Security note: This script will be running inside an restricted AppDomain. Currently AppDomain is not very restricted. |
50 | // | 49 | // |
51 | 50 | ||
51 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
52 | |||
52 | // Object never expires | 53 | // Object never expires |
53 | public override Object InitializeLifetimeService() | 54 | public override Object InitializeLifetimeService() |
54 | { | 55 | { |
@@ -112,7 +113,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
112 | { | 113 | { |
113 | m_LSL_Functions = LSL_Functions; | 114 | m_LSL_Functions = LSL_Functions; |
114 | 115 | ||
115 | //MainLog.Instance.Notice(ScriptEngineName, "LSL_BaseClass.Start() called."); | 116 | //m_log.Info(ScriptEngineName, "LSL_BaseClass.Start() called."); |
116 | 117 | ||
117 | // Get this AppDomain's settings and display some of them. | 118 | // Get this AppDomain's settings and display some of them. |
118 | AppDomainSetup ads = AppDomain.CurrentDomain.SetupInformation; | 119 | AppDomainSetup ads = AppDomain.CurrentDomain.SetupInformation; |
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 242bd27..66475c3 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |||
@@ -43,12 +43,13 @@ using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase; | |||
43 | 43 | ||
44 | namespace OpenSim.Region.ScriptEngine.Common | 44 | namespace OpenSim.Region.ScriptEngine.Common |
45 | { | 45 | { |
46 | |||
47 | /// <summary> | 46 | /// <summary> |
48 | /// Contains all LSL ll-functions. This class will be in Default AppDomain. | 47 | /// Contains all LSL ll-functions. This class will be in Default AppDomain. |
49 | /// </summary> | 48 | /// </summary> |
50 | public class LSL_BuiltIn_Commands : MarshalByRefObject, LSL_BuiltIn_Commands_Interface | 49 | public class LSL_BuiltIn_Commands : MarshalByRefObject, LSL_BuiltIn_Commands_Interface |
51 | { | 50 | { |
51 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
52 | |||
52 | private ASCIIEncoding enc = new ASCIIEncoding(); | 53 | private ASCIIEncoding enc = new ASCIIEncoding(); |
53 | private ScriptEngineBase.ScriptEngine m_ScriptEngine; | 54 | private ScriptEngineBase.ScriptEngine m_ScriptEngine; |
54 | private SceneObjectPart m_host; | 55 | private SceneObjectPart m_host; |
@@ -63,7 +64,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
63 | m_localID = localID; | 64 | m_localID = localID; |
64 | m_itemID = itemID; | 65 | m_itemID = itemID; |
65 | 66 | ||
66 | //MainLog.Instance.Notice(ScriptEngineName, "LSL_BaseClass.Start() called. Hosted by [" + m_host.Name + ":" + m_host.UUID + "@" + m_host.AbsolutePosition + "]"); | 67 | //m_log.Info(ScriptEngineName, "LSL_BaseClass.Start() called. Hosted by [" + m_host.Name + ":" + m_host.UUID + "@" + m_host.AbsolutePosition + "]"); |
67 | } | 68 | } |
68 | 69 | ||
69 | private DateTime m_timer = DateTime.Now; | 70 | private DateTime m_timer = DateTime.Now; |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AppDomainManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AppDomainManager.cs index 2ed0529..0fb8d75 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AppDomainManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AppDomainManager.cs | |||
@@ -26,7 +26,6 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | |||
30 | using System; | 29 | using System; |
31 | using System.Collections; | 30 | using System.Collections; |
32 | using System.Collections.Generic; | 31 | using System.Collections.Generic; |
@@ -37,7 +36,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
37 | { | 36 | { |
38 | public class AppDomainManager : iScriptEngineFunctionModule | 37 | public class AppDomainManager : iScriptEngineFunctionModule |
39 | { | 38 | { |
40 | |||
41 | // | 39 | // |
42 | // This class does AppDomain handling and loading/unloading of scripts in it. | 40 | // This class does AppDomain handling and loading/unloading of scripts in it. |
43 | // It is instanced in "ScriptEngine" and controlled from "ScriptManager" | 41 | // It is instanced in "ScriptEngine" and controlled from "ScriptManager" |
@@ -48,7 +46,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
48 | // 4. Unload AppDomain completely when all scripts in it has stopped | 46 | // 4. Unload AppDomain completely when all scripts in it has stopped |
49 | // | 47 | // |
50 | 48 | ||
51 | |||
52 | private int maxScriptsPerAppDomain = 1; | 49 | private int maxScriptsPerAppDomain = 1; |
53 | 50 | ||
54 | /// <summary> | 51 | /// <summary> |
@@ -149,8 +146,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
149 | ads.ConfigurationFile = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile; | 146 | ads.ConfigurationFile = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile; |
150 | 147 | ||
151 | AppDomain AD = AppDomain.CreateDomain("ScriptAppDomain_" + AppDomainNameCount, null, ads); | 148 | AppDomain AD = AppDomain.CreateDomain("ScriptAppDomain_" + AppDomainNameCount, null, ads); |
152 | m_scriptEngine.Log.Verbose(m_scriptEngine.ScriptEngineName, "AppDomain Loading: " + | 149 | m_scriptEngine.Log.Info("[" + m_scriptEngine.ScriptEngineName + "]: AppDomain Loading: " + |
153 | AssemblyName.GetAssemblyName("OpenSim.Region.ScriptEngine.Common.dll").ToString()); | 150 | AssemblyName.GetAssemblyName("OpenSim.Region.ScriptEngine.Common.dll").ToString()); |
154 | AD.Load(AssemblyName.GetAssemblyName("OpenSim.Region.ScriptEngine.Common.dll")); | 151 | AD.Load(AssemblyName.GetAssemblyName("OpenSim.Region.ScriptEngine.Common.dll")); |
155 | 152 | ||
156 | // Return the new AppDomain | 153 | // Return the new AppDomain |
@@ -183,7 +180,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
183 | // Unload | 180 | // Unload |
184 | AppDomain.Unload(ads.CurrentAppDomain); | 181 | AppDomain.Unload(ads.CurrentAppDomain); |
185 | #if DEBUG | 182 | #if DEBUG |
186 | m_scriptEngine.Log.Verbose(m_scriptEngine.ScriptEngineName, "AppDomain unload freed " + (m - GC.GetTotalMemory(true)) + " bytes of memory"); | 183 | m_scriptEngine.Log.Info("[" + m_scriptEngine.ScriptEngineName + "]: AppDomain unload freed " + (m - GC.GetTotalMemory(true)) + " bytes of memory"); |
187 | #endif | 184 | #endif |
188 | } | 185 | } |
189 | } | 186 | } |
@@ -191,14 +188,13 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
191 | } // lock | 188 | } // lock |
192 | } | 189 | } |
193 | 190 | ||
194 | |||
195 | public IScript LoadScript(string FileName) | 191 | public IScript LoadScript(string FileName) |
196 | { | 192 | { |
197 | // Find next available AppDomain to put it in | 193 | // Find next available AppDomain to put it in |
198 | AppDomainStructure FreeAppDomain = GetFreeAppDomain(); | 194 | AppDomainStructure FreeAppDomain = GetFreeAppDomain(); |
199 | 195 | ||
200 | #if DEBUG | 196 | #if DEBUG |
201 | m_scriptEngine.Log.Verbose(m_scriptEngine.ScriptEngineName, "Loading into AppDomain: " + FileName); | 197 | m_scriptEngine.Log.Info("[" + m_scriptEngine.ScriptEngineName + "]: Loading into AppDomain: " + FileName); |
202 | #endif | 198 | #endif |
203 | IScript mbrt = | 199 | IScript mbrt = |
204 | (IScript) | 200 | (IScript) |
@@ -220,7 +216,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
220 | lock (freeLock) | 216 | lock (freeLock) |
221 | { | 217 | { |
222 | #if DEBUG | 218 | #if DEBUG |
223 | m_scriptEngine.Log.Verbose(m_scriptEngine.ScriptEngineName, "Stopping script in AppDomain"); | 219 | m_scriptEngine.Log.Info("[" + m_scriptEngine.ScriptEngineName + "]: Stopping script in AppDomain"); |
224 | #endif | 220 | #endif |
225 | // Check if it is current AppDomain | 221 | // Check if it is current AppDomain |
226 | if (currentAD.CurrentAppDomain == ad) | 222 | if (currentAD.CurrentAppDomain == ad) |
@@ -244,6 +240,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
244 | 240 | ||
245 | UnloadAppDomains(); // Outsite lock, has its own GetLock | 241 | UnloadAppDomains(); // Outsite lock, has its own GetLock |
246 | } | 242 | } |
243 | |||
247 | /// <summary> | 244 | /// <summary> |
248 | /// If set to true then threads and stuff should try to make a graceful exit | 245 | /// If set to true then threads and stuff should try to make a graceful exit |
249 | /// </summary> | 246 | /// </summary> |
@@ -253,6 +250,5 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
253 | set { _PleaseShutdown = value; } | 250 | set { _PleaseShutdown = value; } |
254 | } | 251 | } |
255 | private bool _PleaseShutdown = false; | 252 | private bool _PleaseShutdown = false; |
256 | |||
257 | } | 253 | } |
258 | } \ No newline at end of file | 254 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/Common.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/Common.cs index fe6dfcd..e99f0a7 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/Common.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/Common.cs | |||
@@ -26,7 +26,6 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | |||
30 | namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | 29 | namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase |
31 | { | 30 | { |
32 | public static class Common | 31 | public static class Common |
@@ -36,23 +35,23 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
36 | 35 | ||
37 | // This class just contains some static log stuff used for debugging. | 36 | // This class just contains some static log stuff used for debugging. |
38 | 37 | ||
39 | //public delegate void SendToDebugEventDelegate(string Message); | 38 | //public delegate void SendToDebugEventDelegate(string message); |
40 | //public delegate void SendToLogEventDelegate(string Message); | 39 | //public delegate void SendToLogEventDelegate(string message); |
41 | //static public event SendToDebugEventDelegate SendToDebugEvent; | 40 | //static public event SendToDebugEventDelegate SendToDebugEvent; |
42 | //static public event SendToLogEventDelegate SendToLogEvent; | 41 | //static public event SendToLogEventDelegate SendToLogEvent; |
43 | 42 | ||
44 | public static void SendToDebug(string Message) | 43 | public static void SendToDebug(string message) |
45 | { | 44 | { |
46 | //if (Debug == true) | 45 | //if (Debug == true) |
47 | mySE.Log.Verbose(mySE.ScriptEngineName, "Debug: " + Message); | 46 | mySE.Log.Info("[" + mySE.ScriptEngineName + "]: Debug: " + message); |
48 | //SendToDebugEvent("\r\n" + DateTime.Now.ToString("[HH:mm:ss] ") + Message); | 47 | //SendToDebugEvent("\r\n" + DateTime.Now.ToString("[HH:mm:ss] ") + message); |
49 | } | 48 | } |
50 | 49 | ||
51 | public static void SendToLog(string Message) | 50 | public static void SendToLog(string message) |
52 | { | 51 | { |
53 | //if (Debug == true) | 52 | //if (Debug == true) |
54 | mySE.Log.Verbose(mySE.ScriptEngineName, "LOG: " + Message); | 53 | mySE.Log.Info("[" + mySE.ScriptEngineName + "]: LOG: " + message); |
55 | //SendToLogEvent("\r\n" + DateTime.Now.ToString("[HH:mm:ss] ") + Message); | 54 | //SendToLogEvent("\r\n" + DateTime.Now.ToString("[HH:mm:ss] ") + message); |
56 | } | 55 | } |
57 | } | 56 | } |
58 | } \ No newline at end of file | 57 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs index 678c3d0..1de010a 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs | |||
@@ -39,7 +39,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
39 | [Serializable] | 39 | [Serializable] |
40 | public class EventManager : OpenSim.Region.ScriptEngine.Common.ScriptServerInterfaces.RemoteEvents, iScriptEngineFunctionModule | 40 | public class EventManager : OpenSim.Region.ScriptEngine.Common.ScriptServerInterfaces.RemoteEvents, iScriptEngineFunctionModule |
41 | { | 41 | { |
42 | |||
43 | // | 42 | // |
44 | // Class is instanced in "ScriptEngine" and Uses "EventQueueManager" that is also instanced in "ScriptEngine". | 43 | // Class is instanced in "ScriptEngine" and Uses "EventQueueManager" that is also instanced in "ScriptEngine". |
45 | // This class needs a bit of explaining: | 44 | // This class needs a bit of explaining: |
@@ -65,7 +64,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
65 | // We may not want to do it because someone is controlling us and will deliver events to us | 64 | // We may not want to do it because someone is controlling us and will deliver events to us |
66 | if (performHookUp) | 65 | if (performHookUp) |
67 | { | 66 | { |
68 | myScriptEngine.Log.Verbose(myScriptEngine.ScriptEngineName, "Hooking up to server events"); | 67 | myScriptEngine.Log.Info("[" + myScriptEngine.ScriptEngineName + "]: Hooking up to server events"); |
69 | myScriptEngine.World.EventManager.OnObjectGrab += touch_start; | 68 | myScriptEngine.World.EventManager.OnObjectGrab += touch_start; |
70 | myScriptEngine.World.EventManager.OnRezScript += OnRezScript; | 69 | myScriptEngine.World.EventManager.OnRezScript += OnRezScript; |
71 | myScriptEngine.World.EventManager.OnRemoveScript += OnRemoveScript; | 70 | myScriptEngine.World.EventManager.OnRemoveScript += OnRemoveScript; |
@@ -78,7 +77,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
78 | { | 77 | { |
79 | } | 78 | } |
80 | 79 | ||
81 | |||
82 | public void changed(uint localID, uint change) | 80 | public void changed(uint localID, uint change) |
83 | { | 81 | { |
84 | // Add to queue for all scripts in localID, Object pass change. | 82 | // Add to queue for all scripts in localID, Object pass change. |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs index e1b1b6c..5e06fcd 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs | |||
@@ -44,7 +44,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
44 | [Serializable] | 44 | [Serializable] |
45 | public class EventQueueManager : iScriptEngineFunctionModule | 45 | public class EventQueueManager : iScriptEngineFunctionModule |
46 | { | 46 | { |
47 | |||
48 | // | 47 | // |
49 | // Class is instanced in "ScriptEngine" and used by "EventManager" also instanced in "ScriptEngine". | 48 | // Class is instanced in "ScriptEngine" and used by "EventManager" also instanced in "ScriptEngine". |
50 | // | 49 | // |
@@ -256,16 +255,15 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
256 | 255 | ||
257 | #endregion | 256 | #endregion |
258 | 257 | ||
259 | |||
260 | #region " Start / stop script execution threads (ThreadClasses) " | 258 | #region " Start / stop script execution threads (ThreadClasses) " |
261 | private void StartNewThreadClass() | 259 | private void StartNewThreadClass() |
262 | { | 260 | { |
263 | EventQueueThreadClass eqtc = new EventQueueThreadClass(this); | 261 | EventQueueThreadClass eqtc = new EventQueueThreadClass(this); |
264 | eventQueueThreads.Add(eqtc); | 262 | eventQueueThreads.Add(eqtc); |
265 | staticGlobalEventQueueThreads.Add(eqtc); | 263 | staticGlobalEventQueueThreads.Add(eqtc); |
266 | m_ScriptEngine.Log.Debug(m_ScriptEngine.ScriptEngineName, "Started new script execution thread. Current thread count: " + eventQueueThreads.Count); | 264 | m_ScriptEngine.Log.Debug("[" + m_ScriptEngine.ScriptEngineName + "]: Started new script execution thread. Current thread count: " + eventQueueThreads.Count); |
267 | |||
268 | } | 265 | } |
266 | |||
269 | private void AbortThreadClass(EventQueueThreadClass threadClass) | 267 | private void AbortThreadClass(EventQueueThreadClass threadClass) |
270 | { | 268 | { |
271 | if (eventQueueThreads.Contains(threadClass)) | 269 | if (eventQueueThreads.Contains(threadClass)) |
@@ -279,10 +277,10 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
279 | } | 277 | } |
280 | catch (Exception ex) | 278 | catch (Exception ex) |
281 | { | 279 | { |
282 | m_ScriptEngine.Log.Error(m_ScriptEngine.ScriptEngineName + ":EventQueueManager", "If you see this, could you please report it to Tedd:"); | 280 | m_ScriptEngine.Log.Error("[" + m_ScriptEngine.ScriptEngineName + ":EventQueueManager]: If you see this, could you please report it to Tedd:"); |
283 | m_ScriptEngine.Log.Error(m_ScriptEngine.ScriptEngineName + ":EventQueueManager", "Script thread execution timeout kill ended in exception: " + ex.ToString()); | 281 | m_ScriptEngine.Log.Error("[" + m_ScriptEngine.ScriptEngineName + ":EventQueueManager]: Script thread execution timeout kill ended in exception: " + ex.ToString()); |
284 | } | 282 | } |
285 | m_ScriptEngine.Log.Debug(m_ScriptEngine.ScriptEngineName, "Killed script execution thread. Remaining thread count: " + eventQueueThreads.Count); | 283 | m_ScriptEngine.Log.Debug("[" + m_ScriptEngine.ScriptEngineName + "]: Killed script execution thread. Remaining thread count: " + eventQueueThreads.Count); |
286 | } | 284 | } |
287 | #endregion | 285 | #endregion |
288 | 286 | ||
@@ -334,8 +332,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
334 | public void AddToObjectQueue(uint localID, string FunctionName, Queue_llDetectParams_Struct qParams, params object[] param) | 332 | public void AddToObjectQueue(uint localID, string FunctionName, Queue_llDetectParams_Struct qParams, params object[] param) |
335 | { | 333 | { |
336 | // Determine all scripts in Object and add to their queue | 334 | // Determine all scripts in Object and add to their queue |
337 | //myScriptEngine.m_logger.Verbose(ScriptEngineName, "EventQueueManager Adding localID: " + localID + ", FunctionName: " + FunctionName); | 335 | //myScriptEngine.log.Info("[" + ScriptEngineName + "]: EventQueueManager Adding localID: " + localID + ", FunctionName: " + FunctionName); |
338 | |||
339 | 336 | ||
340 | // Do we have any scripts in this object at all? If not, return | 337 | // Do we have any scripts in this object at all? If not, return |
341 | if (m_ScriptEngine.m_ScriptManager.Scripts.ContainsKey(localID) == false) | 338 | if (m_ScriptEngine.m_ScriptManager.Scripts.ContainsKey(localID) == false) |
@@ -368,8 +365,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
368 | { | 365 | { |
369 | if (eventQueue.Count >= EventExecutionMaxQueueSize) | 366 | if (eventQueue.Count >= EventExecutionMaxQueueSize) |
370 | { | 367 | { |
371 | m_ScriptEngine.Log.Error(m_ScriptEngine.ScriptEngineName, "ERROR: Event execution queue item count is at " + eventQueue.Count + ". Config variable \"EventExecutionMaxQueueSize\" is set to " + EventExecutionMaxQueueSize + ", so ignoring new event."); | 368 | m_ScriptEngine.Log.Error("[" + m_ScriptEngine.ScriptEngineName + "]: ERROR: Event execution queue item count is at " + eventQueue.Count + ". Config variable \"EventExecutionMaxQueueSize\" is set to " + EventExecutionMaxQueueSize + ", so ignoring new event."); |
372 | m_ScriptEngine.Log.Error(m_ScriptEngine.ScriptEngineName, "Event ignored: localID: " + localID + ", itemID: " + itemID + ", FunctionName: " + FunctionName); | 369 | m_ScriptEngine.Log.Error("[" + m_ScriptEngine.ScriptEngineName + "]: Event ignored: localID: " + localID + ", itemID: " + itemID + ", FunctionName: " + FunctionName); |
373 | return; | 370 | return; |
374 | } | 371 | } |
375 | 372 | ||
@@ -456,6 +453,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
456 | } | 453 | } |
457 | } | 454 | } |
458 | #endregion | 455 | #endregion |
456 | |||
459 | /// <summary> | 457 | /// <summary> |
460 | /// If set to true then threads and stuff should try to make a graceful exit | 458 | /// If set to true then threads and stuff should try to make a graceful exit |
461 | /// </summary> | 459 | /// </summary> |
@@ -465,6 +463,5 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
465 | set { _PleaseShutdown = value; } | 463 | set { _PleaseShutdown = value; } |
466 | } | 464 | } |
467 | private bool _PleaseShutdown = false; | 465 | private bool _PleaseShutdown = false; |
468 | |||
469 | } | 466 | } |
470 | } \ No newline at end of file | 467 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs index ee38306..afa1839 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs | |||
@@ -96,7 +96,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
96 | break; | 96 | break; |
97 | default: | 97 | default: |
98 | MyThreadPriority = ThreadPriority.BelowNormal; // Default | 98 | MyThreadPriority = ThreadPriority.BelowNormal; // Default |
99 | eventQueueManager.m_ScriptEngine.Log.Error("ScriptEngineBase", "Unknown priority type \"" + pri + "\" in config file. Defaulting to \"BelowNormal\"."); | 99 | eventQueueManager.m_ScriptEngine.Log.Error("[ScriptEngineBase]: Unknown priority type \"" + pri + "\" in config file. Defaulting to \"BelowNormal\"."); |
100 | break; | 100 | break; |
101 | } | 101 | } |
102 | 102 | ||
@@ -137,7 +137,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
137 | } | 137 | } |
138 | catch (Exception) | 138 | catch (Exception) |
139 | { | 139 | { |
140 | //myScriptEngine.Log.Verbose(ScriptEngineName, "EventQueueManager Exception killing worker thread: " + e.ToString()); | 140 | //myScriptEngine.Log.Info("[" + ScriptEngineName + "]: EventQueueManager Exception killing worker thread: " + e.ToString()); |
141 | } | 141 | } |
142 | } | 142 | } |
143 | } | 143 | } |
@@ -147,7 +147,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
147 | /// </summary> | 147 | /// </summary> |
148 | private void EventQueueThreadLoop() | 148 | private void EventQueueThreadLoop() |
149 | { | 149 | { |
150 | //myScriptEngine.m_logger.Verbose(ScriptEngineName, "EventQueueManager Worker thread spawned"); | 150 | //myScriptEngine.Log.Info("[" + ScriptEngineName + "]: EventQueueManager Worker thread spawned"); |
151 | try | 151 | try |
152 | { | 152 | { |
153 | while (true) | 153 | while (true) |
@@ -196,7 +196,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
196 | else | 196 | else |
197 | { | 197 | { |
198 | // Something in queue, process | 198 | // Something in queue, process |
199 | //myScriptEngine.m_logger.Verbose(ScriptEngineName, "Processing event for localID: " + QIS.localID + ", itemID: " + QIS.itemID + ", FunctionName: " + QIS.FunctionName); | 199 | //myScriptEngine.Log.Info("[" + ScriptEngineName + "]: Processing event for localID: " + QIS.localID + ", itemID: " + QIS.itemID + ", FunctionName: " + QIS.FunctionName); |
200 | 200 | ||
201 | // OBJECT BASED LOCK - TWO THREADS WORKING ON SAME OBJECT IS NOT GOOD | 201 | // OBJECT BASED LOCK - TWO THREADS WORKING ON SAME OBJECT IS NOT GOOD |
202 | lock (eventQueueManager.queueLock) | 202 | lock (eventQueueManager.queueLock) |
@@ -228,12 +228,12 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
228 | try | 228 | try |
229 | { | 229 | { |
230 | #if DEBUG | 230 | #if DEBUG |
231 | eventQueueManager.m_ScriptEngine.Log.Debug(ScriptEngineName, | 231 | eventQueueManager.m_ScriptEngine.Log.Debug("[" + ScriptEngineName + "]: " + |
232 | "Executing event:\r\n" | 232 | "Executing event:\r\n" |
233 | + "QIS.localID: " + QIS.localID | 233 | + "QIS.localID: " + QIS.localID |
234 | + ", QIS.itemID: " + QIS.itemID | 234 | + ", QIS.itemID: " + QIS.itemID |
235 | + ", QIS.functionName: " + | 235 | + ", QIS.functionName: " + |
236 | QIS.functionName); | 236 | QIS.functionName); |
237 | #endif | 237 | #endif |
238 | LastExecutionStarted = DateTime.Now.Ticks; | 238 | LastExecutionStarted = DateTime.Now.Ticks; |
239 | KillCurrentScript = false; | 239 | KillCurrentScript = false; |
@@ -284,9 +284,9 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
284 | //else | 284 | //else |
285 | //{ | 285 | //{ |
286 | // T oconsole | 286 | // T oconsole |
287 | eventQueueManager.m_ScriptEngine.Log.Error(ScriptEngineName, | 287 | eventQueueManager.m_ScriptEngine.Log.Error("[" + ScriptEngineName + "]: " + |
288 | "Unable to send text in-world:\r\n" + | 288 | "Unable to send text in-world:\r\n" + |
289 | text); | 289 | text); |
290 | } | 290 | } |
291 | finally | 291 | finally |
292 | { | 292 | { |
@@ -309,17 +309,17 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
309 | } | 309 | } |
310 | catch (ThreadAbortException tae) | 310 | catch (ThreadAbortException tae) |
311 | { | 311 | { |
312 | eventQueueManager.m_ScriptEngine.Log.Notice(ScriptEngineName, "ThreadAbortException while executing function."); | 312 | eventQueueManager.m_ScriptEngine.Log.Info("[" + ScriptEngineName + "]: ThreadAbortException while executing function."); |
313 | } | 313 | } |
314 | catch (Exception e) | 314 | catch (Exception e) |
315 | { | 315 | { |
316 | eventQueueManager.m_ScriptEngine.Log.Error(ScriptEngineName, "Exception in EventQueueThreadLoop: " + e.ToString()); | 316 | eventQueueManager.m_ScriptEngine.Log.Error("[" + ScriptEngineName + "]: Exception in EventQueueThreadLoop: " + e.ToString()); |
317 | } | 317 | } |
318 | } // while | 318 | } // while |
319 | } // try | 319 | } // try |
320 | catch (ThreadAbortException) | 320 | catch (ThreadAbortException) |
321 | { | 321 | { |
322 | //myScriptEngine.Log.Verbose(ScriptEngineName, "EventQueueManager Worker thread killed: " + tae.Message); | 322 | //myScriptEngine.Log.Info("[" + ScriptEngineName + "]: EventQueueManager Worker thread killed: " + tae.Message); |
323 | } | 323 | } |
324 | } | 324 | } |
325 | 325 | ||
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs index 4a119f0..ab4ea04 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs | |||
@@ -87,7 +87,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
87 | private void StopMaintenanceThread() | 87 | private void StopMaintenanceThread() |
88 | { | 88 | { |
89 | #if DEBUG | 89 | #if DEBUG |
90 | m_ScriptEngine.Log.Debug(m_ScriptEngine.ScriptEngineName, "StopMaintenanceThread() called"); | 90 | m_ScriptEngine.Log.Debug("[" + m_ScriptEngine.ScriptEngineName + "]: StopMaintenanceThread() called"); |
91 | #endif | 91 | #endif |
92 | PleaseShutdown = true; | 92 | PleaseShutdown = true; |
93 | Thread.Sleep(100); | 93 | Thread.Sleep(100); |
@@ -103,7 +103,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
103 | } | 103 | } |
104 | catch (Exception ex) | 104 | catch (Exception ex) |
105 | { | 105 | { |
106 | m_ScriptEngine.Log.Error(m_ScriptEngine.ScriptEngineName, "Exception stopping maintenence thread: " + ex.ToString()); | 106 | m_ScriptEngine.Log.Error("[" + m_ScriptEngine.ScriptEngineName + "]: Exception stopping maintenence thread: " + ex.ToString()); |
107 | } | 107 | } |
108 | } | 108 | } |
109 | 109 | ||
@@ -113,8 +113,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
113 | public void MaintenanceLoop() | 113 | public void MaintenanceLoop() |
114 | { | 114 | { |
115 | if (m_ScriptEngine.m_EventQueueManager.maxFunctionExecutionTimens < MaintenanceLoopms) | 115 | if (m_ScriptEngine.m_EventQueueManager.maxFunctionExecutionTimens < MaintenanceLoopms) |
116 | m_ScriptEngine.Log.Warn(m_ScriptEngine.ScriptEngineName, | 116 | m_ScriptEngine.Log.Warn("[" + m_ScriptEngine.ScriptEngineName + "]: " + |
117 | "Configuration error: MaxEventExecutionTimeMs is less than MaintenanceLoopms. The Maintenance Loop will only check scripts once per run."); | 117 | "Configuration error: MaxEventExecutionTimeMs is less than MaintenanceLoopms. The Maintenance Loop will only check scripts once per run."); |
118 | 118 | ||
119 | long Last_maxFunctionExecutionTimens = 0; // DateTime.Now.Ticks; | 119 | long Last_maxFunctionExecutionTimens = 0; // DateTime.Now.Ticks; |
120 | long Last_ReReadConfigFilens = DateTime.Now.Ticks; | 120 | long Last_ReReadConfigFilens = DateTime.Now.Ticks; |
@@ -170,7 +170,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
170 | } | 170 | } |
171 | catch (Exception ex) | 171 | catch (Exception ex) |
172 | { | 172 | { |
173 | m_ScriptEngine.Log.Error(m_ScriptEngine.ScriptEngineName, "Exception in MaintenanceLoopThread. Thread will recover after 5 sec throttle. Exception: " + ex.ToString()); | 173 | m_ScriptEngine.Log.Error("[" + m_ScriptEngine.ScriptEngineName + "]: Exception in MaintenanceLoopThread. Thread will recover after 5 sec throttle. Exception: " + ex.ToString()); |
174 | Thread.Sleep(5000); | 174 | Thread.Sleep(5000); |
175 | } | 175 | } |
176 | } | 176 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs index f09e631..78d9f7d 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs | |||
@@ -26,7 +26,6 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | |||
30 | using System; | 29 | using System; |
31 | using System.IO; | 30 | using System.IO; |
32 | using Nini.Config; | 31 | using Nini.Config; |
@@ -45,6 +44,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
45 | [Serializable] | 44 | [Serializable] |
46 | public abstract class ScriptEngine : IRegionModule, OpenSim.Region.ScriptEngine.Common.ScriptServerInterfaces.ScriptEngine, iScriptEngineFunctionModule | 45 | public abstract class ScriptEngine : IRegionModule, OpenSim.Region.ScriptEngine.Common.ScriptServerInterfaces.ScriptEngine, iScriptEngineFunctionModule |
47 | { | 46 | { |
47 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
48 | |||
48 | public Scene World; | 49 | public Scene World; |
49 | public EventManager m_EventManager; // Handles and queues incoming events from OpenSim | 50 | public EventManager m_EventManager; // Handles and queues incoming events from OpenSim |
50 | public EventQueueManager m_EventQueueManager; // Executes events, handles script threads | 51 | public EventQueueManager m_EventQueueManager; // Executes events, handles script threads |
@@ -73,7 +74,10 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
73 | 74 | ||
74 | public abstract ScriptManager _GetScriptManager(); | 75 | public abstract ScriptManager _GetScriptManager(); |
75 | 76 | ||
76 | private LogBase m_log; | 77 | public log4net.ILog Log |
78 | { | ||
79 | get { return m_log; } | ||
80 | } | ||
77 | 81 | ||
78 | public ScriptEngine() | 82 | public ScriptEngine() |
79 | { | 83 | { |
@@ -81,25 +85,18 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
81 | Common.mySE = this; | 85 | Common.mySE = this; |
82 | } | 86 | } |
83 | 87 | ||
84 | public LogBase Log | 88 | public void InitializeEngine(Scene Sceneworld, IConfigSource config, bool HookUpToServer, ScriptManager newScriptManager) |
85 | { | ||
86 | get { return m_log; } | ||
87 | } | ||
88 | |||
89 | public void InitializeEngine(Scene Sceneworld, IConfigSource config, LogBase logger, bool HookUpToServer, ScriptManager newScriptManager) | ||
90 | { | 89 | { |
91 | World = Sceneworld; | 90 | World = Sceneworld; |
92 | m_log = logger; | ||
93 | ConfigSource = config; | 91 | ConfigSource = config; |
94 | Log.Verbose(ScriptEngineName, "ScriptEngine initializing"); | 92 | m_log.Info("[" + ScriptEngineName + "]: ScriptEngine initializing"); |
95 | 93 | ||
96 | // Make sure we have config | 94 | // Make sure we have config |
97 | if (ConfigSource.Configs[ScriptEngineName] == null) | 95 | if (ConfigSource.Configs[ScriptEngineName] == null) |
98 | ConfigSource.AddConfig(ScriptEngineName); | 96 | ConfigSource.AddConfig(ScriptEngineName); |
99 | ScriptConfigSource = ConfigSource.Configs[ScriptEngineName]; | 97 | ScriptConfigSource = ConfigSource.Configs[ScriptEngineName]; |
100 | 98 | ||
101 | 99 | //m_log.Info("[" + ScriptEngineName + "]: InitializeEngine"); | |
102 | //m_logger.Status(ScriptEngineName, "InitializeEngine"); | ||
103 | 100 | ||
104 | // Create all objects we'll be using | 101 | // Create all objects we'll be using |
105 | m_EventQueueManager = new EventQueueManager(this); | 102 | m_EventQueueManager = new EventQueueManager(this); |
@@ -111,11 +108,9 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
111 | m_ASYNCLSLCommandManager = new AsyncLSLCommandManager(this); | 108 | m_ASYNCLSLCommandManager = new AsyncLSLCommandManager(this); |
112 | m_MaintenanceThread = new MaintenanceThread(this); | 109 | m_MaintenanceThread = new MaintenanceThread(this); |
113 | 110 | ||
114 | Log.Verbose(ScriptEngineName, "Reading configuration from config section \"" + ScriptEngineName + "\""); | 111 | m_log.Info("[" + ScriptEngineName + "]: Reading configuration from config section \"" + ScriptEngineName + "\""); |
115 | ReadConfig(); | 112 | ReadConfig(); |
116 | 113 | ||
117 | |||
118 | |||
119 | // Should we iterate the region for scripts that needs starting? | 114 | // Should we iterate the region for scripts that needs starting? |
120 | // Or can we assume we are loaded before anything else so we can use proper events? | 115 | // Or can we assume we are loaded before anything else so we can use proper events? |
121 | } | 116 | } |
@@ -129,10 +124,11 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
129 | { | 124 | { |
130 | return this.m_EventManager; | 125 | return this.m_EventManager; |
131 | } | 126 | } |
127 | |||
132 | public void ReadConfig() | 128 | public void ReadConfig() |
133 | { | 129 | { |
134 | //#if DEBUG | 130 | //#if DEBUG |
135 | // Log.Debug(ScriptEngineName, "Refreshing configuration for all modules"); | 131 | // m_log.Debug("[" + ScriptEngineName + "]: Refreshing configuration for all modules"); |
136 | //#endif | 132 | //#endif |
137 | RefreshConfigFileSeconds = ScriptConfigSource.GetInt("RefreshConfig", 30); | 133 | RefreshConfigFileSeconds = ScriptConfigSource.GetInt("RefreshConfig", 30); |
138 | 134 | ||
@@ -153,10 +149,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
153 | if (m_AppDomainManager != null) m_AppDomainManager.ReadConfig(); | 149 | if (m_AppDomainManager != null) m_AppDomainManager.ReadConfig(); |
154 | if (m_ASYNCLSLCommandManager != null) m_ASYNCLSLCommandManager.ReadConfig(); | 150 | if (m_ASYNCLSLCommandManager != null) m_ASYNCLSLCommandManager.ReadConfig(); |
155 | if (m_MaintenanceThread != null) m_MaintenanceThread.ReadConfig(); | 151 | if (m_MaintenanceThread != null) m_MaintenanceThread.ReadConfig(); |
156 | |||
157 | } | 152 | } |
158 | 153 | ||
159 | |||
160 | #region IRegionModule | 154 | #region IRegionModule |
161 | 155 | ||
162 | public abstract void Initialise(Scene scene, IConfigSource config); | 156 | public abstract void Initialise(Scene scene, IConfigSource config); |
@@ -179,8 +173,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
179 | get { return false; } | 173 | get { return false; } |
180 | } | 174 | } |
181 | 175 | ||
182 | |||
183 | |||
184 | #endregion | 176 | #endregion |
185 | 177 | ||
186 | /// <summary> | 178 | /// <summary> |
@@ -194,4 +186,4 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
194 | private bool _PleaseShutdown = false; | 186 | private bool _PleaseShutdown = false; |
195 | 187 | ||
196 | } | 188 | } |
197 | } \ No newline at end of file | 189 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs index 6661fcc..12d26fc 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs | |||
@@ -249,7 +249,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
249 | { | 249 | { |
250 | if (LUQueue.Count >= LoadUnloadMaxQueueSize) | 250 | if (LUQueue.Count >= LoadUnloadMaxQueueSize) |
251 | { | 251 | { |
252 | m_scriptEngine.Log.Error(m_scriptEngine.ScriptEngineName, "ERROR: Load/unload queue item count is at " + LUQueue.Count + ". Config variable \"LoadUnloadMaxQueueSize\" is set to " + LoadUnloadMaxQueueSize + ", so ignoring new script."); | 252 | m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: ERROR: Load/unload queue item count is at " + LUQueue.Count + ". Config variable \"LoadUnloadMaxQueueSize\" is set to " + LoadUnloadMaxQueueSize + ", so ignoring new script."); |
253 | return; | 253 | return; |
254 | } | 254 | } |
255 | 255 | ||
@@ -299,7 +299,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
299 | Console.WriteLine("ScriptEngine: Inside ExecuteEvent for event " + FunctionName); | 299 | Console.WriteLine("ScriptEngine: Inside ExecuteEvent for event " + FunctionName); |
300 | #endif | 300 | #endif |
301 | // Execute a function in the script | 301 | // Execute a function in the script |
302 | //m_scriptEngine.Log.Verbose(ScriptEngineName, "Executing Function localID: " + localID + ", itemID: " + itemID + ", FunctionName: " + FunctionName); | 302 | //m_scriptEngine.Log.Info("[" + ScriptEngineName + "]: Executing Function localID: " + localID + ", itemID: " + itemID + ", FunctionName: " + FunctionName); |
303 | //ScriptBaseInterface Script = (ScriptBaseInterface)GetScript(localID, itemID); | 303 | //ScriptBaseInterface Script = (ScriptBaseInterface)GetScript(localID, itemID); |
304 | IScript Script = GetScript(localID, itemID); | 304 | IScript Script = GetScript(localID, itemID); |
305 | if (Script == null) | 305 | if (Script == null) |
@@ -418,4 +418,4 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
418 | private bool _PleaseShutdown = false; | 418 | private bool _PleaseShutdown = false; |
419 | 419 | ||
420 | } | 420 | } |
421 | } \ No newline at end of file | 421 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs b/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs index 38f7e7b..d5031c8 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs | |||
@@ -79,12 +79,12 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
79 | { | 79 | { |
80 | RemoteEvents Events(); | 80 | RemoteEvents Events(); |
81 | } | 81 | } |
82 | |||
82 | public interface ScriptEngine | 83 | public interface ScriptEngine |
83 | { | 84 | { |
84 | RemoteEvents EventManager(); | 85 | RemoteEvents EventManager(); |
85 | void InitializeEngine(Scene Sceneworld, IConfigSource config, LogBase logger, bool DontHookUp, ScriptManager newScriptManager); | 86 | void InitializeEngine(Scene Sceneworld, IConfigSource config, bool DontHookUp, ScriptManager newScriptManager); |
86 | ScriptManager GetScriptManager(); | 87 | ScriptManager GetScriptManager(); |
87 | } | 88 | } |
88 | |||
89 | } | 89 | } |
90 | } | 90 | } |
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs index 3451cce..2f985e4 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs | |||
@@ -40,7 +40,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
40 | { | 40 | { |
41 | public class Compiler | 41 | public class Compiler |
42 | { | 42 | { |
43 | |||
44 | // * Uses "LSL2Converter" to convert LSL to C# if necessary. | 43 | // * Uses "LSL2Converter" to convert LSL to C# if necessary. |
45 | // * Compiles C#-code into an assembly | 44 | // * Compiles C#-code into an assembly |
46 | // * Returns assembly name ready for AppDomain load. | 45 | // * Returns assembly name ready for AppDomain load. |
@@ -113,7 +112,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
113 | AllowedCompilers.Clear(); | 112 | AllowedCompilers.Clear(); |
114 | 113 | ||
115 | #if DEBUG | 114 | #if DEBUG |
116 | m_scriptEngine.Log.Debug(m_scriptEngine.ScriptEngineName, "Allowed languages: " + allowComp); | 115 | m_scriptEngine.Log.Debug("[" + m_scriptEngine.ScriptEngineName + "]: Allowed languages: " + allowComp); |
117 | #endif | 116 | #endif |
118 | 117 | ||
119 | 118 | ||
@@ -122,18 +121,18 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
122 | string strlan = strl.Trim(" \t".ToCharArray()).ToLower(); | 121 | string strlan = strl.Trim(" \t".ToCharArray()).ToLower(); |
123 | if (!LanguageMapping.ContainsKey(strlan)) | 122 | if (!LanguageMapping.ContainsKey(strlan)) |
124 | { | 123 | { |
125 | m_scriptEngine.Log.Error(m_scriptEngine.ScriptEngineName, "Config error. Compiler is unable to recongnize language type \"" + strlan + "\" specified in \"AllowedCompilers\"."); | 124 | m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: Config error. Compiler is unable to recongnize language type \"" + strlan + "\" specified in \"AllowedCompilers\"."); |
126 | } | 125 | } |
127 | else | 126 | else |
128 | { | 127 | { |
129 | #if DEBUG | 128 | #if DEBUG |
130 | m_scriptEngine.Log.Debug(m_scriptEngine.ScriptEngineName, "Config OK. Compiler recongnized language type \"" + strlan + "\" specified in \"AllowedCompilers\"."); | 129 | m_scriptEngine.Log.Debug("[" + m_scriptEngine.ScriptEngineName + "]: Config OK. Compiler recongnized language type \"" + strlan + "\" specified in \"AllowedCompilers\"."); |
131 | #endif | 130 | #endif |
132 | } | 131 | } |
133 | AllowedCompilers.Add(strlan, true); | 132 | AllowedCompilers.Add(strlan, true); |
134 | } | 133 | } |
135 | if (AllowedCompilers.Count == 0) | 134 | if (AllowedCompilers.Count == 0) |
136 | m_scriptEngine.Log.Error(m_scriptEngine.ScriptEngineName, "Config error. Compiler could not recognize any language in \"AllowedCompilers\". Scripts will not be executed!"); | 135 | m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: Config error. Compiler could not recognize any language in \"AllowedCompilers\". Scripts will not be executed!"); |
137 | 136 | ||
138 | // Default language | 137 | // Default language |
139 | string defaultCompileLanguage = m_scriptEngine.ScriptConfigSource.GetString("DefaultCompileLanguage", "lsl").ToLower(); | 138 | string defaultCompileLanguage = m_scriptEngine.ScriptConfigSource.GetString("DefaultCompileLanguage", "lsl").ToLower(); |
@@ -141,22 +140,22 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
141 | // Is this language recognized at all? | 140 | // Is this language recognized at all? |
142 | if (!LanguageMapping.ContainsKey(defaultCompileLanguage)) | 141 | if (!LanguageMapping.ContainsKey(defaultCompileLanguage)) |
143 | { | 142 | { |
144 | m_scriptEngine.Log.Error(m_scriptEngine.ScriptEngineName, | 143 | m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: " + |
145 | "Config error. Default language \"" + defaultCompileLanguage + "\" specified in \"DefaultCompileLanguage\" is not recognized as a valid language. Changing default to: \"lsl\"."); | 144 | "Config error. Default language \"" + defaultCompileLanguage + "\" specified in \"DefaultCompileLanguage\" is not recognized as a valid language. Changing default to: \"lsl\"."); |
146 | defaultCompileLanguage = "lsl"; | 145 | defaultCompileLanguage = "lsl"; |
147 | } | 146 | } |
148 | 147 | ||
149 | // Is this language in allow-list? | 148 | // Is this language in allow-list? |
150 | if (!AllowedCompilers.ContainsKey(defaultCompileLanguage)) | 149 | if (!AllowedCompilers.ContainsKey(defaultCompileLanguage)) |
151 | { | 150 | { |
152 | m_scriptEngine.Log.Error(m_scriptEngine.ScriptEngineName, | 151 | m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: " + |
153 | "Config error. Default language \"" + defaultCompileLanguage + "\"specified in \"DefaultCompileLanguage\" is not in list of \"AllowedCompilers\". Scripts may not be executed!"); | 152 | "Config error. Default language \"" + defaultCompileLanguage + "\"specified in \"DefaultCompileLanguage\" is not in list of \"AllowedCompilers\". Scripts may not be executed!"); |
154 | } | 153 | } |
155 | else | 154 | else |
156 | { | 155 | { |
157 | #if DEBUG | 156 | #if DEBUG |
158 | m_scriptEngine.Log.Debug(m_scriptEngine.ScriptEngineName, | 157 | m_scriptEngine.Log.Debug("[" + m_scriptEngine.ScriptEngineName + "]: " + |
159 | "Config OK. Default language \"" + defaultCompileLanguage + "\" specified in \"DefaultCompileLanguage\" is recognized as a valid language."); | 158 | "Config OK. Default language \"" + defaultCompileLanguage + "\" specified in \"DefaultCompileLanguage\" is recognized as a valid language."); |
160 | #endif | 159 | #endif |
161 | // LANGUAGE IS IN ALLOW-LIST | 160 | // LANGUAGE IS IN ALLOW-LIST |
162 | DefaultCompileLanguage = LanguageMapping[defaultCompileLanguage]; | 161 | DefaultCompileLanguage = LanguageMapping[defaultCompileLanguage]; |
@@ -181,13 +180,13 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
181 | } | 180 | } |
182 | catch (Exception ex) | 181 | catch (Exception ex) |
183 | { | 182 | { |
184 | m_scriptEngine.Log.Error(m_scriptEngine.ScriptEngineName, "Exception trying to create ScriptEngine directory \"" + ScriptEnginesPath + "\": " + ex.ToString()); | 183 | m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: Exception trying to create ScriptEngine directory \"" + ScriptEnginesPath + "\": " + ex.ToString()); |
185 | } | 184 | } |
186 | } | 185 | } |
187 | 186 | ||
188 | foreach (string file in Directory.GetFiles(ScriptEnginesPath)) | 187 | foreach (string file in Directory.GetFiles(ScriptEnginesPath)) |
189 | { | 188 | { |
190 | //m_scriptEngine.Log.Error(m_scriptEngine.ScriptEngineName, "FILE FOUND: " + file); | 189 | //m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: FILE FOUND: " + file); |
191 | 190 | ||
192 | if (file.ToLower().StartsWith(FilePrefix + "_compiled_") || | 191 | if (file.ToLower().StartsWith(FilePrefix + "_compiled_") || |
193 | file.ToLower().StartsWith(FilePrefix + "_source_")) | 192 | file.ToLower().StartsWith(FilePrefix + "_source_")) |
@@ -198,7 +197,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
198 | } | 197 | } |
199 | catch (Exception ex) | 198 | catch (Exception ex) |
200 | { | 199 | { |
201 | m_scriptEngine.Log.Error(m_scriptEngine.ScriptEngineName, "Exception trying delete old script file \"" + file + "\": " + ex.ToString()); | 200 | m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: Exception trying delete old script file \"" + file + "\": " + ex.ToString()); |
202 | } | 201 | } |
203 | 202 | ||
204 | } | 203 | } |
@@ -313,7 +312,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
313 | Path.Combine("ScriptEngines", | 312 | Path.Combine("ScriptEngines", |
314 | FilePrefix + "_compiled_" + instanceID.ToString() + "_" + scriptCompileCounter.ToString() + ".dll"); | 313 | FilePrefix + "_compiled_" + instanceID.ToString() + "_" + scriptCompileCounter.ToString() + ".dll"); |
315 | #if DEBUG | 314 | #if DEBUG |
316 | m_scriptEngine.Log.Debug(m_scriptEngine.ScriptEngineName, "Starting compile of \"" + OutFile + "\"."); | 315 | m_scriptEngine.Log.Debug("[" + m_scriptEngine.ScriptEngineName + "]: Starting compile of \"" + OutFile + "\"."); |
317 | #endif | 316 | #endif |
318 | try | 317 | try |
319 | { | 318 | { |
@@ -321,7 +320,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
321 | } | 320 | } |
322 | catch (Exception e) | 321 | catch (Exception e) |
323 | { | 322 | { |
324 | //m_scriptEngine.Log.Error(m_scriptEngine.ScriptEngineName, "Unable to delete old existring script-file before writing new. Compile aborted: " + e.ToString()); | 323 | //m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: Unable to delete old existring script-file before writing new. Compile aborted: " + e.ToString()); |
325 | throw new Exception("Unable to delete old existring script-file before writing new. Compile aborted: " + e.ToString()); | 324 | throw new Exception("Unable to delete old existring script-file before writing new. Compile aborted: " + e.ToString()); |
326 | } | 325 | } |
327 | //string OutFile = Path.Combine("ScriptEngines", "SecondLife.Script.dll"); | 326 | //string OutFile = Path.Combine("ScriptEngines", "SecondLife.Script.dll"); |
@@ -338,7 +337,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
338 | } | 337 | } |
339 | catch (Exception ex) | 338 | catch (Exception ex) |
340 | { | 339 | { |
341 | m_scriptEngine.Log.Error(m_scriptEngine.ScriptEngineName, "Exception while trying to write script source to file \"" + srcFileName + "\": " + ex.ToString()); | 340 | m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: Exception while trying to write script source to file \"" + srcFileName + "\": " + ex.ToString()); |
342 | } | 341 | } |
343 | } | 342 | } |
344 | 343 | ||
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs index 720f946..514c550 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs | |||
@@ -40,7 +40,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
40 | public override void Initialise(Scene scene, IConfigSource config) | 40 | public override void Initialise(Scene scene, IConfigSource config) |
41 | { | 41 | { |
42 | ConfigSource = config; | 42 | ConfigSource = config; |
43 | InitializeEngine(scene, config, MainLog.Instance, true, GetScriptManager()); | 43 | InitializeEngine(scene, config, true, GetScriptManager()); |
44 | } | 44 | } |
45 | 45 | ||
46 | public override OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.ScriptManager _GetScriptManager() | 46 | public override OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.ScriptManager _GetScriptManager() |
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs index 61da6ef..c39d376 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | /* Original code: Tedd Hansen */ | 28 | /* Original code: Tedd Hansen */ |
29 | |||
29 | using System; | 30 | using System; |
30 | using libsecondlife; | 31 | using libsecondlife; |
31 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
@@ -60,7 +61,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
60 | 61 | ||
61 | public override void _StartScript(uint localID, LLUUID itemID, string Script) | 62 | public override void _StartScript(uint localID, LLUUID itemID, string Script) |
62 | { | 63 | { |
63 | m_scriptEngine.Log.Debug(m_scriptEngine.ScriptEngineName, "ScriptManager StartScript: localID: " + localID + ", itemID: " + itemID); | 64 | m_scriptEngine.Log.Debug("[" + m_scriptEngine.ScriptEngineName + "]: ScriptManager StartScript: localID: " + localID + ", itemID: " + itemID); |
64 | 65 | ||
65 | 66 | ||
66 | //IScriptHost root = host.GetRoot(); | 67 | //IScriptHost root = host.GetRoot(); |
@@ -85,7 +86,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
85 | CompiledScript = m_scriptEngine.m_AppDomainManager.LoadScript(ScriptSource); | 86 | CompiledScript = m_scriptEngine.m_AppDomainManager.LoadScript(ScriptSource); |
86 | 87 | ||
87 | #if DEBUG | 88 | #if DEBUG |
88 | m_scriptEngine.Log.Debug(m_scriptEngine.ScriptEngineName, "Script " + itemID + " occupies {0} bytes", GC.GetTotalMemory(true) - before); | 89 | m_scriptEngine.Log.Debug(String.Format("[" + m_scriptEngine.ScriptEngineName + "]: Script " + itemID + " occupies {0} bytes", GC.GetTotalMemory(true) - before)); |
89 | #endif | 90 | #endif |
90 | 91 | ||
91 | CompiledScript.Source = Script; | 92 | CompiledScript.Source = Script; |
@@ -106,7 +107,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
106 | } | 107 | } |
107 | catch (Exception e) | 108 | catch (Exception e) |
108 | { | 109 | { |
109 | //m_scriptEngine.Log.Error("ScriptEngine", "Error compiling script: " + e.ToString()); | 110 | //m_scriptEngine.Log.Error("[ScriptEngine]: Error compiling script: " + e.ToString()); |
110 | try | 111 | try |
111 | { | 112 | { |
112 | // DISPLAY ERROR INWORLD | 113 | // DISPLAY ERROR INWORLD |
@@ -118,9 +119,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
118 | } | 119 | } |
119 | catch (Exception e2) | 120 | catch (Exception e2) |
120 | { | 121 | { |
121 | m_scriptEngine.Log.Error(m_scriptEngine.ScriptEngineName, "Error displaying error in-world: " + e2.ToString()); | 122 | m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: Error displaying error in-world: " + e2.ToString()); |
122 | m_scriptEngine.Log.Error(m_scriptEngine.ScriptEngineName, | 123 | m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: " + |
123 | "Errormessage: Error compiling script:\r\n" + e.Message.ToString()); | 124 | "Errormessage: Error compiling script:\r\n" + e.Message.ToString()); |
124 | } | 125 | } |
125 | } | 126 | } |
126 | } | 127 | } |
@@ -129,7 +130,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
129 | { | 130 | { |
130 | // Stop script | 131 | // Stop script |
131 | #if DEBUG | 132 | #if DEBUG |
132 | m_scriptEngine.Log.Debug(m_scriptEngine.ScriptEngineName, "Stop script localID: " + localID + " LLUID: " + itemID.ToString()); | 133 | m_scriptEngine.Log.Debug("[" + m_scriptEngine.ScriptEngineName + "]: Stop script localID: " + localID + " LLUID: " + itemID.ToString()); |
133 | #endif | 134 | #endif |
134 | 135 | ||
135 | // Stop long command on script | 136 | // Stop long command on script |
@@ -142,7 +143,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
142 | // TEMP: First serialize it | 143 | // TEMP: First serialize it |
143 | //GetSerializedScript(localID, itemID); | 144 | //GetSerializedScript(localID, itemID); |
144 | 145 | ||
145 | |||
146 | try | 146 | try |
147 | { | 147 | { |
148 | // Get AppDomain | 148 | // Get AppDomain |
@@ -156,10 +156,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
156 | } | 156 | } |
157 | catch (Exception e) | 157 | catch (Exception e) |
158 | { | 158 | { |
159 | m_scriptEngine.Log.Error(m_scriptEngine.ScriptEngineName, "Exception stopping script localID: " + localID + " LLUID: " + itemID.ToString() + | 159 | m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: Exception stopping script localID: " + localID + " LLUID: " + itemID.ToString() + |
160 | ": " + e.ToString()); | 160 | ": " + e.ToString()); |
161 | } | 161 | } |
162 | } | 162 | } |
163 | |||
164 | } | 163 | } |
165 | } \ No newline at end of file | 164 | } |
diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/LSOEngine/ScriptEngine.cs index 45dfd9e..2a846a9 100644 --- a/OpenSim/Region/ScriptEngine/LSOEngine/ScriptEngine.cs +++ b/OpenSim/Region/ScriptEngine/LSOEngine/ScriptEngine.cs | |||
@@ -44,7 +44,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine | |||
44 | // We need to override a few things for our DotNetEngine | 44 | // We need to override a few things for our DotNetEngine |
45 | public override void Initialise(Scene scene, IConfigSource config) | 45 | public override void Initialise(Scene scene, IConfigSource config) |
46 | { | 46 | { |
47 | InitializeEngine(scene, config, MainLog.Instance, true, GetScriptManager()); | 47 | InitializeEngine(scene, config, true, GetScriptManager()); |
48 | } | 48 | } |
49 | 49 | ||
50 | public override OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.ScriptManager _GetScriptManager() | 50 | public override OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.ScriptManager _GetScriptManager() |
diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs index 652c24c..db81487 100644 --- a/OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs | |||
@@ -101,7 +101,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine | |||
101 | } | 101 | } |
102 | catch (Exception e) | 102 | catch (Exception e) |
103 | { | 103 | { |
104 | //m_scriptEngine.Log.Error("ScriptEngine", "Error compiling script: " + e.ToString()); | 104 | //m_scriptEngine.Log.Error("[ScriptEngine]: Error compiling script: " + e.ToString()); |
105 | try | 105 | try |
106 | { | 106 | { |
107 | // DISPLAY ERROR INWORLD | 107 | // DISPLAY ERROR INWORLD |
@@ -113,9 +113,9 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine | |||
113 | } | 113 | } |
114 | catch (Exception e2) | 114 | catch (Exception e2) |
115 | { | 115 | { |
116 | m_scriptEngine.Log.Error("ScriptEngine", "Error displaying error in-world: " + e2.ToString()); | 116 | m_scriptEngine.Log.Error("[ScriptEngine]: Error displaying error in-world: " + e2.ToString()); |
117 | m_scriptEngine.Log.Error("ScriptEngine", | 117 | m_scriptEngine.Log.Error("[ScriptEngine]: " + |
118 | "Errormessage: Error compiling script:\r\n" + e.Message.ToString()); | 118 | "Errormessage: Error compiling script:\r\n" + e.Message.ToString()); |
119 | } | 119 | } |
120 | } | 120 | } |
121 | } | 121 | } |
@@ -125,7 +125,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine | |||
125 | // Stop script | 125 | // Stop script |
126 | Console.WriteLine("Stop script localID: " + localID + " LLUID: " + itemID.ToString()); | 126 | Console.WriteLine("Stop script localID: " + localID + " LLUID: " + itemID.ToString()); |
127 | 127 | ||
128 | |||
129 | // Stop long command on script | 128 | // Stop long command on script |
130 | m_scriptEngine.m_ASYNCLSLCommandManager.RemoveScript(localID, itemID); | 129 | m_scriptEngine.m_ASYNCLSLCommandManager.RemoveScript(localID, itemID); |
131 | 130 | ||
@@ -136,7 +135,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine | |||
136 | // TEMP: First serialize it | 135 | // TEMP: First serialize it |
137 | //GetSerializedScript(localID, itemID); | 136 | //GetSerializedScript(localID, itemID); |
138 | 137 | ||
139 | |||
140 | try | 138 | try |
141 | { | 139 | { |
142 | // Get AppDomain | 140 | // Get AppDomain |
@@ -157,7 +155,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine | |||
157 | 155 | ||
158 | public override void Initialize() | 156 | public override void Initialize() |
159 | { | 157 | { |
160 | |||
161 | } | 158 | } |
162 | } | 159 | } |
163 | } \ No newline at end of file | 160 | } |
diff --git a/OpenSim/Region/ScriptEngine/RemoteServer/Common.cs b/OpenSim/Region/ScriptEngine/RemoteServer/Common.cs index bac32cb..e65b8ff 100644 --- a/OpenSim/Region/ScriptEngine/RemoteServer/Common.cs +++ b/OpenSim/Region/ScriptEngine/RemoteServer/Common.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | /* Original code: Tedd Hansen */ | 28 | /* Original code: Tedd Hansen */ |
29 | |||
29 | namespace OpenSim.Region.ScriptEngine.RemoteServer | 30 | namespace OpenSim.Region.ScriptEngine.RemoteServer |
30 | { | 31 | { |
31 | public static class Common | 32 | public static class Common |
@@ -43,15 +44,15 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer | |||
43 | public static void SendToDebug(string Message) | 44 | public static void SendToDebug(string Message) |
44 | { | 45 | { |
45 | //if (Debug == true) | 46 | //if (Debug == true) |
46 | mySE.Log.Verbose("ScriptEngine", "Debug: " + Message); | 47 | mySE.Log.Info("[ScriptEngine]: Debug: " + Message); |
47 | //SendToDebugEvent("\r\n" + DateTime.Now.ToString("[HH:mm:ss] ") + Message); | 48 | //SendToDebugEvent("\r\n" + DateTime.Now.ToString("[HH:mm:ss] ") + Message); |
48 | } | 49 | } |
49 | 50 | ||
50 | public static void SendToLog(string Message) | 51 | public static void SendToLog(string Message) |
51 | { | 52 | { |
52 | //if (Debug == true) | 53 | //if (Debug == true) |
53 | mySE.Log.Verbose("ScriptEngine", "LOG: " + Message); | 54 | mySE.Log.Info("[ScriptEngine]: LOG: " + Message); |
54 | //SendToLogEvent("\r\n" + DateTime.Now.ToString("[HH:mm:ss] ") + Message); | 55 | //SendToLogEvent("\r\n" + DateTime.Now.ToString("[HH:mm:ss] ") + Message); |
55 | } | 56 | } |
56 | } | 57 | } |
57 | } \ No newline at end of file | 58 | } |
diff --git a/OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs b/OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs index 047ff2e..971982c 100644 --- a/OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | /* Original code: Tedd Hansen */ | 28 | /* Original code: Tedd Hansen */ |
29 | |||
29 | using System; | 30 | using System; |
30 | using libsecondlife; | 31 | using libsecondlife; |
31 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
@@ -40,7 +41,6 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer | |||
40 | [Serializable] | 41 | [Serializable] |
41 | internal class EventManager | 42 | internal class EventManager |
42 | { | 43 | { |
43 | |||
44 | System.Collections.Generic.Dictionary<uint, ScriptServerInterfaces.ServerRemotingObject> remoteScript = new System.Collections.Generic.Dictionary<uint, ScriptServerInterfaces.ServerRemotingObject>(); | 44 | System.Collections.Generic.Dictionary<uint, ScriptServerInterfaces.ServerRemotingObject> remoteScript = new System.Collections.Generic.Dictionary<uint, ScriptServerInterfaces.ServerRemotingObject>(); |
45 | TCPClient m_TCPClient; | 45 | TCPClient m_TCPClient; |
46 | TRPC_Remote RPC; | 46 | TRPC_Remote RPC; |
@@ -59,32 +59,28 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer | |||
59 | RPC.ReceiveCommand += new TRPC_Remote.ReceiveCommandDelegate(RPC_ReceiveCommand); | 59 | RPC.ReceiveCommand += new TRPC_Remote.ReceiveCommandDelegate(RPC_ReceiveCommand); |
60 | myScriptServerID = m_TCPClient.ConnectAndReturnID(remoteHost, remotePort); | 60 | myScriptServerID = m_TCPClient.ConnectAndReturnID(remoteHost, remotePort); |
61 | 61 | ||
62 | myScriptEngine.Log.Verbose("RemoteEngine", "Hooking up to server events"); | 62 | myScriptEngine.Log.Info("[RemoteEngine]: Hooking up to server events"); |
63 | //myScriptEngine.World.EventManager.OnObjectGrab += touch_start; | 63 | //myScriptEngine.World.EventManager.OnObjectGrab += touch_start; |
64 | myScriptEngine.World.EventManager.OnRezScript += OnRezScript; | 64 | myScriptEngine.World.EventManager.OnRezScript += OnRezScript; |
65 | //myScriptEngine.World.EventManager.OnRemoveScript += OnRemoveScript; | 65 | //myScriptEngine.World.EventManager.OnRemoveScript += OnRemoveScript; |
66 | |||
67 | |||
68 | } | 66 | } |
69 | 67 | ||
70 | void RPC_ReceiveCommand(int ID, string Command, params object[] p) | 68 | void RPC_ReceiveCommand(int ID, string Command, params object[] p) |
71 | { | 69 | { |
72 | myScriptEngine.Log.Notice("REMOTESERVER", "Received command: '" + Command + "'"); | 70 | myScriptEngine.Log.Info("[REMOTESERVER]: Received command: '" + Command + "'"); |
73 | if (p != null) | 71 | if (p != null) |
74 | { | 72 | { |
75 | for (int i = 0; i < p.Length; i++) | 73 | for (int i = 0; i < p.Length; i++) |
76 | { | 74 | { |
77 | myScriptEngine.Log.Notice("REMOTESERVER", "Param " + i + ": " + p[i].ToString()); | 75 | myScriptEngine.Log.Info("[REMOTESERVER]: Param " + i + ": " + p[i].ToString()); |
78 | } | 76 | } |
79 | } | 77 | } |
80 | |||
81 | } | 78 | } |
82 | 79 | ||
83 | |||
84 | public void OnRezScript(uint localID, LLUUID itemID, string script) | 80 | public void OnRezScript(uint localID, LLUUID itemID, string script) |
85 | { | 81 | { |
86 | // WE ARE CREATING A NEW SCRIPT ... CREATE SCRIPT, GET A REMOTEID THAT WE MAP FROM LOCALID | 82 | // WE ARE CREATING A NEW SCRIPT ... CREATE SCRIPT, GET A REMOTEID THAT WE MAP FROM LOCALID |
87 | myScriptEngine.Log.Verbose("RemoteEngine", "Creating new script (with connection)"); | 83 | myScriptEngine.Log.Info("[RemoteEngine]: Creating new script (with connection)"); |
88 | 84 | ||
89 | // Temp for now: We have one connection only - this is hardcoded in myScriptServerID | 85 | // Temp for now: We have one connection only - this is hardcoded in myScriptServerID |
90 | RPC.SendCommand(myScriptServerID, "OnRezScript", localID, itemID.ToString(), script); | 86 | RPC.SendCommand(myScriptServerID, "OnRezScript", localID, itemID.ToString(), script); |
@@ -92,18 +88,15 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer | |||
92 | //ScriptServerInterfaces.ServerRemotingObject obj = myScriptEngine.m_RemoteServer.Connect("localhost", 1234); | 88 | //ScriptServerInterfaces.ServerRemotingObject obj = myScriptEngine.m_RemoteServer.Connect("localhost", 1234); |
93 | //remoteScript.Add(localID, obj); | 89 | //remoteScript.Add(localID, obj); |
94 | //remoteScript[localID].Events().OnRezScript(localID, itemID, script); | 90 | //remoteScript[localID].Events().OnRezScript(localID, itemID, script); |
95 | |||
96 | |||
97 | } | 91 | } |
98 | 92 | ||
99 | public void touch_start(uint localID, LLVector3 offsetPos, IClientAPI remoteClient) | 93 | public void touch_start(uint localID, LLVector3 offsetPos, IClientAPI remoteClient) |
100 | { | 94 | { |
101 | //remoteScript[localID].Events.touch_start(localID, offsetPos, remoteClient); | 95 | //remoteScript[localID].Events.touch_start(localID, offsetPos, remoteClient); |
102 | RPC.SendCommand(myScriptServerID, "touch_start", offsetPos, "How to transfer IClientAPI?"); | 96 | RPC.SendCommand(myScriptServerID, "touch_start", offsetPos, "How to transfer IClientAPI?"); |
103 | } | 97 | } |
104 | 98 | ||
105 | 99 | ||
106 | |||
107 | // PLACEHOLDERS -- CODE WILL CHANGE! | 100 | // PLACEHOLDERS -- CODE WILL CHANGE! |
108 | 101 | ||
109 | 102 | ||
@@ -266,6 +259,5 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer | |||
266 | //{ | 259 | //{ |
267 | // remoteScript[localID].Events.http_response(localID, itemID); | 260 | // remoteScript[localID].Events.http_response(localID, itemID); |
268 | //} | 261 | //} |
269 | |||
270 | } | 262 | } |
271 | } \ No newline at end of file | 263 | } |
diff --git a/OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.cs index d0dc7ab..8d27251 100644 --- a/OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.cs +++ b/OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | /* Original code: Tedd Hansen */ | 28 | /* Original code: Tedd Hansen */ |
29 | |||
29 | using System; | 30 | using System; |
30 | using Nini.Config; | 31 | using Nini.Config; |
31 | using OpenSim.Framework.Console; | 32 | using OpenSim.Framework.Console; |
@@ -41,28 +42,27 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer | |||
41 | [Serializable] | 42 | [Serializable] |
42 | public class ScriptEngine : IRegionModule | 43 | public class ScriptEngine : IRegionModule |
43 | { | 44 | { |
45 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
46 | |||
44 | internal Scene World; | 47 | internal Scene World; |
45 | internal EventManager m_EventManager; // Handles and queues incoming events from OpenSim | 48 | internal EventManager m_EventManager; // Handles and queues incoming events from OpenSim |
46 | internal RemoteServer m_RemoteServer; // Handles connections to remote servers | 49 | internal RemoteServer m_RemoteServer; // Handles connections to remote servers |
47 | 50 | ||
48 | private LogBase m_log; | ||
49 | |||
50 | public ScriptEngine() | 51 | public ScriptEngine() |
51 | { | 52 | { |
52 | Common.mySE = this; | 53 | Common.mySE = this; |
53 | } | 54 | } |
54 | 55 | ||
55 | public LogBase Log | 56 | public log4net.ILog Log |
56 | { | 57 | { |
57 | get { return m_log; } | 58 | get { return m_log; } |
58 | } | 59 | } |
59 | 60 | ||
60 | public void InitializeEngine(Scene Sceneworld, LogBase logger) | 61 | public void InitializeEngine(Scene Sceneworld) |
61 | { | 62 | { |
62 | World = Sceneworld; | 63 | World = Sceneworld; |
63 | m_log = logger; | ||
64 | 64 | ||
65 | Log.Verbose("ScriptEngine", "RemoteEngine (Remote Script Server) initializing"); | 65 | m_log.Info("[ScriptEngine]: RemoteEngine (Remote Script Server) initializing"); |
66 | // Create all objects we'll be using | 66 | // Create all objects we'll be using |
67 | m_EventManager = new EventManager(this); | 67 | m_EventManager = new EventManager(this); |
68 | m_RemoteServer = new RemoteServer(); | 68 | m_RemoteServer = new RemoteServer(); |
@@ -74,12 +74,11 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer | |||
74 | // We are shutting down | 74 | // We are shutting down |
75 | } | 75 | } |
76 | 76 | ||
77 | |||
78 | #region IRegionModule | 77 | #region IRegionModule |
79 | 78 | ||
80 | public void Initialise(Scene scene, IConfigSource config) | 79 | public void Initialise(Scene scene, IConfigSource config) |
81 | { | 80 | { |
82 | InitializeEngine(scene, MainLog.Instance); | 81 | InitializeEngine(scene); |
83 | } | 82 | } |
84 | 83 | ||
85 | public void PostInitialise() | 84 | public void PostInitialise() |
@@ -101,6 +100,5 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer | |||
101 | } | 100 | } |
102 | 101 | ||
103 | #endregion | 102 | #endregion |
104 | |||
105 | } | 103 | } |
106 | } \ No newline at end of file | 104 | } |
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.DB4o/DB4oDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.DB4o/DB4oDataStore.cs index 5125709..992f931 100644 --- a/OpenSim/Region/Storage/OpenSim.DataStore.DB4o/DB4oDataStore.cs +++ b/OpenSim/Region/Storage/OpenSim.DataStore.DB4o/DB4oDataStore.cs | |||
@@ -42,9 +42,10 @@ using Db4objects.Db4o.Query; | |||
42 | 42 | ||
43 | namespace OpenSim.DataStore.DB4oStorage | 43 | namespace OpenSim.DataStore.DB4oStorage |
44 | { | 44 | { |
45 | |||
46 | public class SceneObjectQuery : Predicate | 45 | public class SceneObjectQuery : Predicate |
47 | { | 46 | { |
47 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
48 | |||
48 | private LLUUID globalIDSearch; | 49 | private LLUUID globalIDSearch; |
49 | 50 | ||
50 | public SceneObjectQuery(LLUUID find) | 51 | public SceneObjectQuery(LLUUID find) |
@@ -58,17 +59,14 @@ namespace OpenSim.DataStore.DB4oStorage | |||
58 | } | 59 | } |
59 | } | 60 | } |
60 | 61 | ||
61 | |||
62 | public class DB4oDataStore : IRegionDataStore | 62 | public class DB4oDataStore : IRegionDataStore |
63 | { | 63 | { |
64 | private IObjectContainer db; | 64 | private IObjectContainer db; |
65 | 65 | ||
66 | public void Initialise(string dbfile, string dbname) | 66 | public void Initialise(string dbfile, string dbname) |
67 | { | 67 | { |
68 | MainLog.Instance.Verbose("DATASTORE", "DB4O - Opening " + dbfile); | 68 | m_log.Info("[DATASTORE]: DB4O - Opening " + dbfile); |
69 | db = Db4oFactory.OpenFile(dbfile); | 69 | db = Db4oFactory.OpenFile(dbfile); |
70 | |||
71 | return; | ||
72 | } | 70 | } |
73 | 71 | ||
74 | public void StoreObject(SceneObjectGroup obj, LLUUID regionUUID) | 72 | public void StoreObject(SceneObjectGroup obj, LLUUID regionUUID) |
@@ -91,7 +89,7 @@ namespace OpenSim.DataStore.DB4oStorage | |||
91 | IObjectSet result = db.Get(typeof(SceneObjectGroup)); | 89 | IObjectSet result = db.Get(typeof(SceneObjectGroup)); |
92 | List<SceneObjectGroup> retvals = new List<SceneObjectGroup>(); | 90 | List<SceneObjectGroup> retvals = new List<SceneObjectGroup>(); |
93 | 91 | ||
94 | MainLog.Instance.Verbose("DATASTORE", "DB4O - LoadObjects found " + result.Count.ToString() + " objects"); | 92 | m_log.Info("[DATASTORE]: DB4O - LoadObjects found " + result.Count.ToString() + " objects"); |
95 | 93 | ||
96 | foreach (Object obj in result) | 94 | foreach (Object obj in result) |
97 | { | 95 | { |
@@ -103,7 +101,6 @@ namespace OpenSim.DataStore.DB4oStorage | |||
103 | 101 | ||
104 | public void StoreTerrain(double[,] ter) | 102 | public void StoreTerrain(double[,] ter) |
105 | { | 103 | { |
106 | |||
107 | } | 104 | } |
108 | 105 | ||
109 | public double[,] LoadTerrain() | 106 | public double[,] LoadTerrain() |
@@ -113,12 +110,10 @@ namespace OpenSim.DataStore.DB4oStorage | |||
113 | 110 | ||
114 | public void RemoveLandObject(uint id) | 111 | public void RemoveLandObject(uint id) |
115 | { | 112 | { |
116 | |||
117 | } | 113 | } |
118 | 114 | ||
119 | public void StoreParcel(Land parcel) | 115 | public void StoreParcel(Land parcel) |
120 | { | 116 | { |
121 | |||
122 | } | 117 | } |
123 | 118 | ||
124 | public List<Land> LoadLandObjects() | 119 | public List<Land> LoadLandObjects() |
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs index 28df4e7..6a79c8a 100644 --- a/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs +++ b/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs | |||
@@ -43,6 +43,8 @@ namespace OpenSim.DataStore.MSSQL | |||
43 | { | 43 | { |
44 | public class MSSQLDataStore : IRegionDataStore | 44 | public class MSSQLDataStore : IRegionDataStore |
45 | { | 45 | { |
46 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
47 | |||
46 | private const string primSelect = "select * from prims"; | 48 | private const string primSelect = "select * from prims"; |
47 | private const string shapeSelect = "select * from primshapes"; | 49 | private const string shapeSelect = "select * from primshapes"; |
48 | private const string terrainSelect = "select * from terrain"; | 50 | private const string terrainSelect = "select * from terrain"; |
@@ -68,7 +70,7 @@ namespace OpenSim.DataStore.MSSQL | |||
68 | 70 | ||
69 | ds = new DataSet(); | 71 | ds = new DataSet(); |
70 | 72 | ||
71 | MainLog.Instance.Verbose("DATASTORE", "MSSQL - connecting: " + settingInitialCatalog); | 73 | m_log.Info("[DATASTORE]: MSSQL - connecting: " + settingInitialCatalog); |
72 | SqlConnection conn = new SqlConnection(connectionString); | 74 | SqlConnection conn = new SqlConnection(connectionString); |
73 | SqlCommand primSelectCmd = new SqlCommand(primSelect, conn); | 75 | SqlCommand primSelectCmd = new SqlCommand(primSelect, conn); |
74 | primDa = new SqlDataAdapter(primSelectCmd); | 76 | primDa = new SqlDataAdapter(primSelectCmd); |
@@ -109,7 +111,7 @@ namespace OpenSim.DataStore.MSSQL | |||
109 | } | 111 | } |
110 | catch (Exception) | 112 | catch (Exception) |
111 | { | 113 | { |
112 | MainLog.Instance.Verbose("DATASTORE", "Caught fill error on primshapes table"); | 114 | m_log.Info("[DATASTORE]: Caught fill error on primshapes table"); |
113 | } | 115 | } |
114 | try | 116 | try |
115 | { | 117 | { |
@@ -117,7 +119,7 @@ namespace OpenSim.DataStore.MSSQL | |||
117 | } | 119 | } |
118 | catch (Exception) | 120 | catch (Exception) |
119 | { | 121 | { |
120 | MainLog.Instance.Verbose("DATASTORE", "Caught fill error on terrain table"); | 122 | m_log.Info("[DATASTORE]: Caught fill error on terrain table"); |
121 | } | 123 | } |
122 | return; | 124 | return; |
123 | } | 125 | } |
@@ -129,18 +131,18 @@ namespace OpenSim.DataStore.MSSQL | |||
129 | { | 131 | { |
130 | foreach (SceneObjectPart prim in obj.Children.Values) | 132 | foreach (SceneObjectPart prim in obj.Children.Values) |
131 | { | 133 | { |
132 | MainLog.Instance.Verbose("DATASTORE", "Adding obj: " + obj.UUID + " to region: " + regionUUID); | 134 | m_log.Info("[DATASTORE]: Adding obj: " + obj.UUID + " to region: " + regionUUID); |
133 | addPrim(prim, obj.UUID, regionUUID); | 135 | addPrim(prim, obj.UUID, regionUUID); |
134 | } | 136 | } |
135 | } | 137 | } |
136 | 138 | ||
137 | Commit(); | 139 | Commit(); |
138 | // MainLog.Instance.Verbose("Dump of prims:", ds.GetXml()); | 140 | // m_log.Info("Dump of prims:", ds.GetXml()); |
139 | } | 141 | } |
140 | 142 | ||
141 | public void RemoveObject(LLUUID obj, LLUUID regionUUID) | 143 | public void RemoveObject(LLUUID obj, LLUUID regionUUID) |
142 | { | 144 | { |
143 | MainLog.Instance.Verbose("DATASTORE", "Removing obj: {0} from region: {1}", obj.UUID, regionUUID); | 145 | m_log.Info(String.Format("[DATASTORE]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID)); |
144 | 146 | ||
145 | DataTable prims = ds.Tables["prims"]; | 147 | DataTable prims = ds.Tables["prims"]; |
146 | DataTable shapes = ds.Tables["primshapes"]; | 148 | DataTable shapes = ds.Tables["primshapes"]; |
@@ -179,7 +181,7 @@ namespace OpenSim.DataStore.MSSQL | |||
179 | lock (ds) | 181 | lock (ds) |
180 | { | 182 | { |
181 | DataRow[] primsForRegion = prims.Select(byRegion, orderByParent); | 183 | DataRow[] primsForRegion = prims.Select(byRegion, orderByParent); |
182 | MainLog.Instance.Verbose("DATASTORE", | 184 | m_log.Info("[DATASTORE]: " + |
183 | "Loaded " + primsForRegion.Length + " prims for region: " + regionUUID); | 185 | "Loaded " + primsForRegion.Length + " prims for region: " + regionUUID); |
184 | 186 | ||
185 | foreach (DataRow primRow in primsForRegion) | 187 | foreach (DataRow primRow in primsForRegion) |
@@ -199,7 +201,7 @@ namespace OpenSim.DataStore.MSSQL | |||
199 | } | 201 | } |
200 | else | 202 | else |
201 | { | 203 | { |
202 | MainLog.Instance.Notice( | 204 | m_log.Info( |
203 | "No shape found for prim in storage, so setting default box shape"); | 205 | "No shape found for prim in storage, so setting default box shape"); |
204 | prim.Shape = PrimitiveBaseShape.Default; | 206 | prim.Shape = PrimitiveBaseShape.Default; |
205 | } | 207 | } |
@@ -219,7 +221,7 @@ namespace OpenSim.DataStore.MSSQL | |||
219 | } | 221 | } |
220 | else | 222 | else |
221 | { | 223 | { |
222 | MainLog.Instance.Notice( | 224 | m_log.Info( |
223 | "No shape found for prim in storage, so setting default box shape"); | 225 | "No shape found for prim in storage, so setting default box shape"); |
224 | prim.Shape = PrimitiveBaseShape.Default; | 226 | prim.Shape = PrimitiveBaseShape.Default; |
225 | } | 227 | } |
@@ -228,11 +230,11 @@ namespace OpenSim.DataStore.MSSQL | |||
228 | } | 230 | } |
229 | catch (Exception e) | 231 | catch (Exception e) |
230 | { | 232 | { |
231 | MainLog.Instance.Error("DATASTORE", "Failed create prim object, exception and data follows"); | 233 | m_log.Error("[DATASTORE]: Failed create prim object, exception and data follows"); |
232 | MainLog.Instance.Verbose("DATASTORE", e.ToString()); | 234 | m_log.Info("[DATASTORE]: " + e.ToString()); |
233 | foreach (DataColumn col in prims.Columns) | 235 | foreach (DataColumn col in prims.Columns) |
234 | { | 236 | { |
235 | MainLog.Instance.Verbose("DATASTORE", "Col: " + col.ColumnName + " => " + primRow[col]); | 237 | m_log.Info("[DATASTORE]: Col: " + col.ColumnName + " => " + primRow[col]); |
236 | } | 238 | } |
237 | } | 239 | } |
238 | } | 240 | } |
@@ -245,7 +247,7 @@ namespace OpenSim.DataStore.MSSQL | |||
245 | { | 247 | { |
246 | int revision = Util.UnixTimeSinceEpoch(); | 248 | int revision = Util.UnixTimeSinceEpoch(); |
247 | 249 | ||
248 | MainLog.Instance.Verbose("DATASTORE", "Storing terrain revision r" + revision.ToString()); | 250 | m_log.Info("[DATASTORE]: Storing terrain revision r" + revision.ToString()); |
249 | 251 | ||
250 | DataTable terrain = ds.Tables["terrain"]; | 252 | DataTable terrain = ds.Tables["terrain"]; |
251 | lock (ds) | 253 | lock (ds) |
@@ -288,12 +290,12 @@ namespace OpenSim.DataStore.MSSQL | |||
288 | } | 290 | } |
289 | else | 291 | else |
290 | { | 292 | { |
291 | MainLog.Instance.Verbose("DATASTORE", "No terrain found for region"); | 293 | m_log.Info("[DATASTORE]: No terrain found for region"); |
292 | return null; | 294 | return null; |
293 | } | 295 | } |
294 | 296 | ||
295 | 297 | ||
296 | MainLog.Instance.Verbose("DATASTORE", "Loaded terrain revision r" + rev.ToString()); | 298 | m_log.Info("[DATASTORE]: Loaded terrain revision r" + rev.ToString()); |
297 | } | 299 | } |
298 | 300 | ||
299 | return terret; | 301 | return terret; |
@@ -950,7 +952,7 @@ namespace OpenSim.DataStore.MSSQL | |||
950 | } | 952 | } |
951 | catch (SqlException) | 953 | catch (SqlException) |
952 | { | 954 | { |
953 | MainLog.Instance.Warn("MSSQL", "Primitives Table Already Exists"); | 955 | m_log.Warn("[MSSQL]: Primitives Table Already Exists"); |
954 | } | 956 | } |
955 | 957 | ||
956 | try | 958 | try |
@@ -960,7 +962,7 @@ namespace OpenSim.DataStore.MSSQL | |||
960 | } | 962 | } |
961 | catch (SqlException) | 963 | catch (SqlException) |
962 | { | 964 | { |
963 | MainLog.Instance.Warn("MSSQL", "Shapes Table Already Exists"); | 965 | m_log.Warn("[MSSQL]: Shapes Table Already Exists"); |
964 | } | 966 | } |
965 | 967 | ||
966 | try | 968 | try |
@@ -970,7 +972,7 @@ namespace OpenSim.DataStore.MSSQL | |||
970 | } | 972 | } |
971 | catch (SqlException) | 973 | catch (SqlException) |
972 | { | 974 | { |
973 | MainLog.Instance.Warn("MSSQL", "Terrain Table Already Exists"); | 975 | m_log.Warn("[MSSQL]: Terrain Table Already Exists"); |
974 | } | 976 | } |
975 | 977 | ||
976 | conn.Close(); | 978 | conn.Close(); |
@@ -994,7 +996,7 @@ namespace OpenSim.DataStore.MSSQL | |||
994 | } | 996 | } |
995 | catch (SqlException) | 997 | catch (SqlException) |
996 | { | 998 | { |
997 | MainLog.Instance.Verbose("DATASTORE", "MSSQL Database doesn't exist... creating"); | 999 | m_log.Info("[DATASTORE]: MSSQL Database doesn't exist... creating"); |
998 | InitDB(conn); | 1000 | InitDB(conn); |
999 | } | 1001 | } |
1000 | 1002 | ||
@@ -1009,14 +1011,14 @@ namespace OpenSim.DataStore.MSSQL | |||
1009 | } | 1011 | } |
1010 | catch (SqlException e) | 1012 | catch (SqlException e) |
1011 | { | 1013 | { |
1012 | MainLog.Instance.Verbose("DATASTORE", e.ToString()); | 1014 | m_log.Info("[DATASTORE]: " + e.ToString()); |
1013 | } | 1015 | } |
1014 | 1016 | ||
1015 | foreach (DataColumn col in createPrimTable().Columns) | 1017 | foreach (DataColumn col in createPrimTable().Columns) |
1016 | { | 1018 | { |
1017 | if (!tmpDS.Tables["prims"].Columns.Contains(col.ColumnName)) | 1019 | if (!tmpDS.Tables["prims"].Columns.Contains(col.ColumnName)) |
1018 | { | 1020 | { |
1019 | MainLog.Instance.Verbose("DATASTORE", "Missing required column:" + col.ColumnName); | 1021 | m_log.Info("[DATASTORE]: Missing required column:" + col.ColumnName); |
1020 | return false; | 1022 | return false; |
1021 | } | 1023 | } |
1022 | } | 1024 | } |
@@ -1024,7 +1026,7 @@ namespace OpenSim.DataStore.MSSQL | |||
1024 | { | 1026 | { |
1025 | if (!tmpDS.Tables["primshapes"].Columns.Contains(col.ColumnName)) | 1027 | if (!tmpDS.Tables["primshapes"].Columns.Contains(col.ColumnName)) |
1026 | { | 1028 | { |
1027 | MainLog.Instance.Verbose("DATASTORE", "Missing required column:" + col.ColumnName); | 1029 | m_log.Info("[DATASTORE]: Missing required column:" + col.ColumnName); |
1028 | return false; | 1030 | return false; |
1029 | } | 1031 | } |
1030 | } | 1032 | } |
@@ -1032,7 +1034,7 @@ namespace OpenSim.DataStore.MSSQL | |||
1032 | { | 1034 | { |
1033 | if (!tmpDS.Tables["terrain"].Columns.Contains(col.ColumnName)) | 1035 | if (!tmpDS.Tables["terrain"].Columns.Contains(col.ColumnName)) |
1034 | { | 1036 | { |
1035 | MainLog.Instance.Verbose("DATASTORE", "Missing require column:" + col.ColumnName); | 1037 | m_log.Info("[DATASTORE]: Missing require column:" + col.ColumnName); |
1036 | return false; | 1038 | return false; |
1037 | } | 1039 | } |
1038 | } | 1040 | } |
diff --git a/OpenSim/Region/Terrain.BasicTerrain/Properties/AssemblyInfo.cs b/OpenSim/Region/Terrain.BasicTerrain/Properties/AssemblyInfo.cs index 33537fa..219ab1c 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/Properties/AssemblyInfo.cs | |||
@@ -62,4 +62,4 @@ using System.Runtime.InteropServices; | |||
62 | // by using the '*' as shown below: | 62 | // by using the '*' as shown below: |
63 | 63 | ||
64 | [assembly : AssemblyVersion("1.0.0.0")] | 64 | [assembly : AssemblyVersion("1.0.0.0")] |
65 | [assembly : AssemblyFileVersion("1.0.0.0")] \ No newline at end of file | 65 | [assembly : AssemblyFileVersion("1.0.0.0")] |