aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tools/Export
diff options
context:
space:
mode:
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");