aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tools/Export
diff options
context:
space:
mode:
authorJeff Ames2008-02-05 19:44:27 +0000
committerJeff Ames2008-02-05 19:44:27 +0000
commit6ed5283bc06a62f38eb517e67b975832b603bf61 (patch)
treee5f635018789b73a99ddeca0883a68368fa5eece /OpenSim/Tools/Export
parentCut down on the number of packets sent during terraforming. Terraforming shou... (diff)
downloadopensim-SC_OLD-6ed5283bc06a62f38eb517e67b975832b603bf61.zip
opensim-SC_OLD-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.gz
opensim-SC_OLD-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.bz2
opensim-SC_OLD-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.xz
Converted logging to use log4net.
Changed LogBase to ConsoleBase, which handles console I/O. This is mostly an in-place conversion, so lots of refactoring can still be done.
Diffstat (limited to 'OpenSim/Tools/Export')
-rw-r--r--OpenSim/Tools/Export/OpenSimExport.cs17
1 files changed, 5 insertions, 12 deletions
diff --git a/OpenSim/Tools/Export/OpenSimExport.cs b/OpenSim/Tools/Export/OpenSimExport.cs
index 8f4957c..8eebe35 100644
--- a/OpenSim/Tools/Export/OpenSimExport.cs
+++ b/OpenSim/Tools/Export/OpenSimExport.cs
@@ -47,10 +47,7 @@ namespace OpenSim.Tools.Export
47 // AddinManager.Initialize("."); 47 // AddinManager.Initialize(".");
48 // AddinManager.Registry.Update(null); 48 // AddinManager.Registry.Update(null);
49 49
50 // TODO: this really sucks, but given the way we do 50 MainConsole.Instance = CreateConsole();
51 // logging in OpenSim, we need to establish a log up front
52
53 MainLog.Instance = CreateLog();
54 51
55 sman = new StorageManager( 52 sman = new StorageManager(
56 startup.GetString("storage_plugin", "OpenSim.DataStore.NullStorage.dll"), 53 startup.GetString("storage_plugin", "OpenSim.DataStore.NullStorage.dll"),
@@ -61,6 +58,8 @@ namespace OpenSim.Tools.Export
61 58
62 public static void Main(string[] args) 59 public static void Main(string[] args)
63 { 60 {
61 log4net.Config.XmlConfigurator.Configure();
62
64 OpenSimExport export = new OpenSimExport(InitConfig(args)); 63 OpenSimExport export = new OpenSimExport(InitConfig(args));
65 RegionInfo reg = new RegionInfo("Sara Jane", "Regions/1000-1000.xml",false); 64 RegionInfo reg = new RegionInfo("Sara Jane", "Regions/1000-1000.xml",false);
66 65
@@ -71,17 +70,11 @@ namespace OpenSim.Tools.Export
71 } 70 }
72 } 71 }
73 72
74 protected LogBase CreateLog() 73 protected ConsoleBase CreateConsole()
75 { 74 {
76 if (!Directory.Exists(Util.logDir())) 75 return new ConsoleBase("Export", null);
77 {
78 Directory.CreateDirectory(Util.logDir());
79 }
80
81 return new LogBase((Path.Combine(Util.logDir(), "export.log")), "Export", null, true);
82 } 76 }
83 77
84
85 private static IniConfigSource InitConfig(string[] args) 78 private static IniConfigSource InitConfig(string[] args)
86 { 79 {
87 Console.WriteLine("Good"); 80 Console.WriteLine("Good");