![]() |
VOOZH | about |
dotnet add package System.Diagnostics.EventLog --version 10.0.9
NuGet\Install-Package System.Diagnostics.EventLog -Version 10.0.9
<PackageReference Include="System.Diagnostics.EventLog" Version="10.0.9" />
<PackageVersion Include="System.Diagnostics.EventLog" Version="10.0.9" />Directory.Packages.props
<PackageReference Include="System.Diagnostics.EventLog" />Project file
paket add System.Diagnostics.EventLog --version 10.0.9
#r "nuget: System.Diagnostics.EventLog, 10.0.9"
#:package System.Diagnostics.EventLog@10.0.9
#addin nuget:?package=System.Diagnostics.EventLog&version=10.0.9Install as a Cake Addin
#tool nuget:?package=System.Diagnostics.EventLog&version=10.0.9Install as a Cake Tool
This package provides types that allow applications to interact with the Windows Event Log service.
When an error occurs in a Windows machine, the system administrator or support representative must determine what caused the error, attempt to recover any lost data, and prevent the error from recurring. It is helpful if applications, the operating system, and other system services record important events, such as low-memory conditions or excessive attempts to access a disk. The system administrator can then use the Windows Event Log to help determine what conditions caused the error and identify the context in which it occurred.
if(!EventLog.SourceExists("MySource"))
{
// An event log source should not be created and immediately used.
// There is a latency time to enable the source, it should be created
// prior to executing the application that uses the source.
// Execute this sample a second time to use the new source.
EventLog.CreateEventSource("MySource", "MyNewLog");
Console.WriteLine("Event source created. Exiting, execute the application a second time to use the source.");
// The source is created. Exit the application to allow it to be registered.
return;
}
EventLog myLog = new();
myLog.Source = "MySource";
myLog.WriteEntry("Writing an informational entry to the event log.");
Notes:
System.Diagnostics.EventLog class.The main types provided by this library are:
Under the System.Diagnostics namespace, the main types are:
System.Diagnostics.EventLogSystem.Diagnostics.EventLogEntrySystem.Diagnostics.EventLogEntryCollectionSystem.Diagnostics.EventLogEntryTypeUnder the System.Diagnostics.Eventing.Reader namespace, the main types are:
System.Diagnostics.Eventing.Reader.EventLogQuerySystem.Diagnostics.Eventing.Reader.EventLogReaderSystem.Diagnostics.Eventing.Reader.EventLogRecordSystem.Diagnostics.Eventing.Reader.EventLogSessionSystem.Diagnostics.Eventing.Reader.EventLogTypeSystem.Diagnostics.Eventing.Reader.EventRecordSystem.Diagnostics.EventLog is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 is compatible. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 5 NuGet packages that depend on System.Diagnostics.EventLog:
| Package | Downloads |
|---|---|
|
System.Configuration.ConfigurationManager
Provides types that support using XML configuration files (app.config). This package exists only to support migrating existing .NET Framework code that already uses System.Configuration. When writing new code, use another configuration system instead, such as Microsoft.Extensions.Configuration. |
|
|
Castle.Core
Castle Core, including DynamicProxy, Logging Abstractions and DictionaryAdapter |
|
|
Microsoft.Extensions.Logging.EventLog
Windows Event Log logger provider implementation for Microsoft.Extensions.Logging. |
|
|
Microsoft.Build
This package contains the Microsoft.Build assembly which is used to create, edit, and evaluate MSBuild projects. |
|
|
System.ServiceProcess.ServiceController
Provides the System.ServiceProcess.ServiceController class, which allows you to connect to a Windows service, manipulate it, or get information about it. Commonly Used Types: System.ServiceProcess.ServiceController System.ServiceProcess.ServiceControllerStatus System.ServiceProcess.ServiceType |
Showing the top 20 popular GitHub repositories that depend on System.Diagnostics.EventLog:
| Repository | Stars |
|---|---|
|
PowerShell/PowerShell
PowerShell for every system!
|
|
|
dotnet/roslyn
The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
|
|
|
duplicati/duplicati
Store securely encrypted backups in the cloud!
|
|
|
mRemoteNG/mRemoteNG
mRemoteNG is the next generation of mRemote, open source, tabbed, multi-protocol, remote connections manager.
|
|
|
dotnet/wpf
WPF is a .NET Core UI framework for building Windows desktop applications.
|
|
|
NLog/NLog
NLog - Flexible and Structured Logging for various .NET Platforms
|
|
|
microsoft/VFSForGit
Virtual File System for Git: Enable Git at Enterprise Scale
|
|
|
microsoft/WPF-Samples
Repository for WPF related samples
|
|
|
HotCakeX/Harden-Windows-Security
Harden Windows Safely, Securely using Official Supported Microsoft methods and proper explanation | Always up-to-date and works with the latest build of Windows | Provides tools and Guides for Personal, Enterprise, Government and Military security levels | SLSA Level 3 Compliant for Secure Development and Build Process | Apps Available on MS Store✨
|
|
|
dotnet/corert
This repo contains CoreRT, an experimental .NET Core runtime optimized for AOT (ahead of time compilation) scenarios, with the accompanying compiler toolchain.
|
|
|
dotnet/macios
.NET for iOS, Mac Catalyst, macOS, and tvOS provide open-source bindings of the Apple SDKs for use with .NET managed languages such as C#
|
|
|
PLFJY/ContextMenuMgr
A Windows context menu management tool with new menu monitoring
|
|
|
ProtonVPN/win-app
Official ProtonVPN Windows app
|
|
|
castleproject/Core
Castle Core, including Castle DynamicProxy, Logging Services and DictionaryAdapter
|
|
|
ariacom/Seal-Report
Database Reporting Tool and Tasks (.Net)
|
|
|
matterpreter/OffensiveCSharp
Collection of Offensive C# Tooling
|
|
|
dahall/TaskScheduler
Provides a .NET wrapper for the Windows Task Scheduler. It aggregates the multiple versions, provides an editor and allows for localization.
|
|
|
MarimerLLC/csla
A home for your business logic in any .NET application.
|
|
|
luolangaga/tubatools
图吧工具箱 winUI3 版
|
|
|
CXWorld/CapFrameX
Frametime capture and analysis tool
|
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.0-preview.5.26302.115 | 5,607 | 6/9/2026 |
| 11.0.0-preview.4.26230.115 | 23,062 | 5/12/2026 |
| 11.0.0-preview.3.26207.106 | 18,199 | 4/14/2026 |
| 11.0.0-preview.2.26159.112 | 28,399 | 3/10/2026 |
| 11.0.0-preview.1.26104.118 | 22,888 | 2/10/2026 |
| 10.0.9 | 1,486,685 | 6/9/2026 |
| 10.0.8 | 7,072,879 | 5/12/2026 |
| 10.0.7 | 8,924,324 | 4/21/2026 |
| 10.0.6 | 2,663,858 | 4/14/2026 |
| 10.0.5 | 11,879,345 | 3/12/2026 |
| 10.0.4 | 1,086,591 | 3/10/2026 |
| 10.0.3 | 10,483,197 | 2/10/2026 |
| 10.0.2 | 11,195,931 | 1/13/2026 |
| 10.0.1 | 12,102,274 | 12/9/2025 |
| 9.0.17 | 72,617 | 6/9/2026 |
| 9.0.16 | 335,136 | 5/12/2026 |
| 9.0.15 | 896,493 | 4/14/2026 |
| 9.0.14 | 1,165,283 | 3/10/2026 |
| 9.0.13 | 7,084,902 | 2/10/2026 |
| 9.0.12 | 1,508,613 | 1/13/2026 |