devicemap-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wk...@apache.org
Subject svn commit: r1703259 - in /devicemap/trunk/clients/1.0/csharp: DeviceMap/DeviceMap.csproj DeviceMap/util/Util.cs DeviceMapConsole/DeviceMapConsole.csproj DeviceMapConsole/Program.cs README log4net.dll
Date Tue, 15 Sep 2015 17:02:31 GMT
Author: wkeil
Date: Tue Sep 15 17:02:31 2015
New Revision: 1703259

URL: http://svn.apache.org/r1703259
Log:
DMAP-152: Use Log4net to log in .NET clients 
Factoring out Log4Net
Task-Url: https://issues.apache.org/jira/browse/DMAP-152

Removed:
    devicemap/trunk/clients/1.0/csharp/log4net.dll
Modified:
    devicemap/trunk/clients/1.0/csharp/DeviceMap/DeviceMap.csproj
    devicemap/trunk/clients/1.0/csharp/DeviceMap/util/Util.cs
    devicemap/trunk/clients/1.0/csharp/DeviceMapConsole/DeviceMapConsole.csproj
    devicemap/trunk/clients/1.0/csharp/DeviceMapConsole/Program.cs
    devicemap/trunk/clients/1.0/csharp/README

Modified: devicemap/trunk/clients/1.0/csharp/DeviceMap/DeviceMap.csproj
URL: http://svn.apache.org/viewvc/devicemap/trunk/clients/1.0/csharp/DeviceMap/DeviceMap.csproj?rev=1703259&r1=1703258&r2=1703259&view=diff
==============================================================================
--- devicemap/trunk/clients/1.0/csharp/DeviceMap/DeviceMap.csproj (original)
+++ devicemap/trunk/clients/1.0/csharp/DeviceMap/DeviceMap.csproj Tue Sep 15 17:02:31 2015
@@ -41,9 +41,6 @@
     </ApplicationIcon>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="log4net">
-      <HintPath>..\log4net.dll</HintPath>
-    </Reference>
     <Reference Include="System" />
     <Reference Include="System.configuration" />
     <Reference Include="System.Core" />

Modified: devicemap/trunk/clients/1.0/csharp/DeviceMap/util/Util.cs
URL: http://svn.apache.org/viewvc/devicemap/trunk/clients/1.0/csharp/DeviceMap/util/Util.cs?rev=1703259&r1=1703258&r2=1703259&view=diff
==============================================================================
--- devicemap/trunk/clients/1.0/csharp/DeviceMap/util/Util.cs (original)
+++ devicemap/trunk/clients/1.0/csharp/DeviceMap/util/Util.cs Tue Sep 15 17:02:31 2015
@@ -24,11 +24,13 @@ using System.Collections;
 using System.Diagnostics;
 using System.IO;
 using System.Text;
+/*
 using log4net;
 using log4net.Repository.Hierarchy;
 using log4net.Core;
 using log4net.Appender;
 using log4net.Layout;
+*/
 
 //
 namespace DeviceMap
@@ -151,7 +153,7 @@ namespace DeviceMap
                        myLog.WriteEntry(entryStr, type);
                    }
                } */
-
+/*
         public static void SetupLogging()
         {
             Hierarchy hierarchy = (Hierarchy)LogManager.GetRepository();
@@ -178,5 +180,6 @@ namespace DeviceMap
             hierarchy.Root.Level = Level.Info;
             hierarchy.Configured = true;
         }
+ */
     }
 }
\ No newline at end of file

Modified: devicemap/trunk/clients/1.0/csharp/DeviceMapConsole/DeviceMapConsole.csproj
URL: http://svn.apache.org/viewvc/devicemap/trunk/clients/1.0/csharp/DeviceMapConsole/DeviceMapConsole.csproj?rev=1703259&r1=1703258&r2=1703259&view=diff
==============================================================================
--- devicemap/trunk/clients/1.0/csharp/DeviceMapConsole/DeviceMapConsole.csproj (original)
+++ devicemap/trunk/clients/1.0/csharp/DeviceMapConsole/DeviceMapConsole.csproj Tue Sep 15
17:02:31 2015
@@ -70,10 +70,6 @@
     <SignManifests>false</SignManifests>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821,
processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\log4net.dll</HintPath>
-    </Reference>
     <Reference Include="System" />
     <Reference Include="System.Core" />
     <Reference Include="System.Xml.Linq" />

Modified: devicemap/trunk/clients/1.0/csharp/DeviceMapConsole/Program.cs
URL: http://svn.apache.org/viewvc/devicemap/trunk/clients/1.0/csharp/DeviceMapConsole/Program.cs?rev=1703259&r1=1703258&r2=1703259&view=diff
==============================================================================
--- devicemap/trunk/clients/1.0/csharp/DeviceMapConsole/Program.cs (original)
+++ devicemap/trunk/clients/1.0/csharp/DeviceMapConsole/Program.cs Tue Sep 15 17:02:31 2015
@@ -22,15 +22,15 @@ using System.Diagnostics;
 using System.IO;
 using System.Linq;
 using DeviceMap;
-using log4net;
+//using log4net;
 class Program
 {
     //Here is the once-per-class call to initialize the log object
-    private static readonly ILog log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
+    //private static readonly ILog log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
 
     static void Main(string[] args)
     {
-        Util.SetupLogging();
+        //Util.SetupLogging();
         string testDataDirectory = Util.Home();
         string testDataFile = @"ua_strings.txt";
         Stopwatch stopWatch = new Stopwatch();
@@ -44,8 +44,9 @@ class Program
         catch (DeviceMapException deviceMapException)
         {
             //Util.WriteEntry("DeviceMap", deviceMapException.Message, EventLogEntryType.Error,
deviceMapException);
-            log.Fatal("Client Error", deviceMapException);
-            Console.WriteLine(deviceMapException.Message);
+            //log.Fatal("Client Error", deviceMapException);
+            //Console.WriteLine(deviceMapException.Message);
+            Util.Log("Client Error", deviceMapException);
         }
         stopWatch.Stop();
         Console.Clear();
@@ -92,7 +93,7 @@ class Program
             Console.ReadKey();
         } else
         {
-            log.Error("Client or Data not found");
+            //log.Error("Client or Data not found");
             Console.WriteLine("DeviceMap Client or Data not found.");
         }
     }

Modified: devicemap/trunk/clients/1.0/csharp/README
URL: http://svn.apache.org/viewvc/devicemap/trunk/clients/1.0/csharp/README?rev=1703259&r1=1703258&r2=1703259&view=diff
==============================================================================
--- devicemap/trunk/clients/1.0/csharp/README (original)
+++ devicemap/trunk/clients/1.0/csharp/README Tue Sep 15 17:02:31 2015
@@ -48,9 +48,4 @@ Either a URL or the location of a folder
 
 The config file also contains the supported .NET runtime version.
 <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
-You should normally not have to change this. Doing so is at your own risk. DeviceMap C# client
does not support .NET below 4.0, but in case you have multiple versions of the .NET Framework
installed, you may chose a particular one, e.g. if you face problems running DeviceMapConsole.
-
-## Logging
-DeviceMap uses Apache Log4Net (https://logging.apache.org/log4net/)
-Regular operation of DeviceMapConsole will just write to the console.
-Logging is configured to log only errors or exceptional conditions into a file DeviceMap.log.
Should this file exceed 500 MB, a RollingAppender will copy it over. See Apache Log4Net documentation
under https://logging.apache.org/log4net/ for further details.
\ No newline at end of file
+You should normally not have to change this. Doing so is at your own risk. DeviceMap C# client
does not support .NET below 4.0, but in case you have multiple versions of the .NET Framework
installed, you may chose a particular one, e.g. if you face problems running DeviceMapConsole.
\ No newline at end of file



Mime
View raw message