You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devicemap.apache.org by "Werner Keil (JIRA)" <ji...@apache.org> on 2015/08/22 16:23:45 UTC
[jira] [Commented] (DMAP-152) Use Log4net to log in .NET clients
[ https://issues.apache.org/jira/browse/DMAP-152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14708048#comment-14708048 ]
Werner Keil commented on DMAP-152:
----------------------------------
The approach with Windows EventLog won't work if users don't have admin privileges, see this exception:
Ausnahmefehler: System.Security.SecurityException: Die Quelle wurde nicht gefunden, aber einige oder alle Ereignisprotokolle konnten nicht durchsucht werden. Protokolle, auf die kein Zugriff möglich war: Security.
bei System.Diagnostics.EventLog.FindSourceRegistration(String source, String
machineName, Boolean readOnly, Boolean wantToCreate)
bei System.Diagnostics.EventLog.SourceExists(String source, String machineName, Boolean wantToCreate)
bei System.Diagnostics.EventLog.SourceExists(String source)
bei DeviceMap.Util.WriteEntry(String appName, String entryStr, EventLogEntryType type, Exception ex)
bei Program.Main(String[] args)
Log4Net should avoid this problem.
> Use Log4net to log in .NET clients
> ----------------------------------
>
> Key: DMAP-152
> URL: https://issues.apache.org/jira/browse/DMAP-152
> Project: DeviceMap
> Issue Type: Improvement
> Components: .NET Client
> Environment: Windows
> Reporter: Werner Keil
> Assignee: Werner Keil
> Priority: Minor
> Labels: .net, Windows, log4net, logging
>
> Currently the .NET clients have a very simple logging abstraction only writing to the console. While it would add one external dependency (of another Apache project ;-) ) using *Log4net* in these places could improve flexibility and control of logging, e.g. log into both files and the console, tweak log levels, etc.
> I evaluated .NET logging for a client project and did not find a satisfying built-in log API similar to at least *java.util.logging* on the Java side. If it exists, please advise. Since our solution here has to combine .NET and Java apps working together in a larger system Log4net and Log4J were a pretty natural choice. Unless Microsoft has something out of the box in .NET this being an Apache project would also make the license topic a no-brainer.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)