SyslogLogging 2.0.2
See the version list below for details.
dotnet add package SyslogLogging --version 2.0.2
NuGet\Install-Package SyslogLogging -Version 2.0.2
<PackageReference Include="SyslogLogging" Version="2.0.2" />
paket add SyslogLogging --version 2.0.2
#r "nuget: SyslogLogging, 2.0.2"
// Install SyslogLogging as a Cake Addin #addin nuget:?package=SyslogLogging&version=2.0.2 // Install SyslogLogging as a Cake Tool #tool nuget:?package=SyslogLogging&version=2.0.2
SyslogLogging
Simple C# class library for logging to syslog, console, and file, targeted to .NET Core, .NET Standard, and .NET Framework. For a sample app please refer to the included test project.
SyslogLogging is targeted to .NET Core, .NET Standard, and .NET Framework.
Help or Feedback
First things first - do you need help or have feedback? File an issue here! We'd love to hear from you.
New in v2.0.1
- Breaking changes including new constructors and minor API changes
- Support for multiple syslog servers
- Simplified class definitions
It's Really Easy... I Mean, REALLY Easy
By default, 127.0.0.1:514
is automatically included in the list of servers.
Single Syslog Server
using SyslogLogging;
LoggingModule log = new LoggingModule(); // 127.0.0.1:514 is automatically included
log.Debug("This is a debug message!");
Multiple Syslog Servers and Console
using SyslogLogging;
List<SyslogServer> servers = new List<SyslogServer>
{
new SyslogServer("logginghost.com", 2000),
new SyslogServer("myhost.com", 514)
};
LoggingModule log = new LoggingModule(servers, true); // true to enable console
log.Warn("Look out!");
Logging to File
using SyslogLogging;
LoggingModule log = new LoggingModule("mylogfile.txt");
log.Info("Here's some new information!");
Logging EVERYWHERE
using SyslogLogging;
List<SyslogServer> servers = new List<SyslogServer>
{
new SyslogServer("127.0.0.1", 514)
};
LoggingModule log = new LoggingModule(servers, true); // true to enable console
log.Settings.FileLogging = FileLoggingMode.SingleLogFile;
log.Settings.LogFilename = "mylogfile.txt";
log.Alert("We're going everywhere!");
When using FileLoggingMode.FileWithDate
, LoggingModule with append .yyyyMMdd
to the supplied filename in LogFilename
. When using FileLoggingMode.SingleLogFile
, the filename is left untouched.
Supported Environments
Tested and works well in Windows in .NET Framework 4.5.2 or later or .NET Core. Tested and works well in Linux and OSX environments, too. Should work well in Mono environments. You may want to use the Mono Ahead-of-time compiler (AOT).
This package has also been tested with PaperTrail. Realistically, any cloud syslog server should work.
Changing Console Message Color
If you wish to change the colors used by the library, modify the Settings.Colors
property. A variable of type ColorScheme
exists for each severity level. To disable colors, set Settings.EnableColors
to false.
log.Settings.EnableColors = true;
log.Settings.Colors.Debug = new ColorScheme(ConsoleColor.DarkGray, ConsoleColor.Black);
Special Thanks
We'd like to extend a special thank you to those that have helped make this library better, including:
@dev-jan @jisotalo
Version History
Please refer to CHANGELOG.md.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
.NET Framework | net451 is compatible. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.5.1
- No dependencies.
-
.NETStandard 2.1
- No dependencies.
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
NuGet packages (11)
Showing the top 5 NuGet packages that depend on SyslogLogging:
Package | Downloads |
---|---|
Omnicx.WebStore.Core
OmniCX WebStore Core contains the Controllers, API SDK and Models required to run the MVC Views of the WebStore. |
|
BigQ.dll
BigQ is a messaging platform using TCP sockets and websockets featuring sync, async, channel, and private communications. |
|
ContainerFS
Self-contained single-user file system written in C#. |
|
Less3
<3 Less3 is S3-compatible object storage that you can run on your laptop, server, or anywhere you like. |
|
RestDb
RestDb is a platform that enables a RESTful API interface in front of Microsoft SQL Server, MySQL, PostgreSQL, and Sqlite databases. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.0.6 | 205 | 10/17/2024 |
2.0.5 | 243 | 9/10/2024 |
2.0.4 | 117 | 9/10/2024 |
2.0.3 | 100 | 9/10/2024 |
2.0.2 | 9,521 | 8/1/2023 |
2.0.1.8 | 9,041 | 10/6/2022 |
2.0.1.7 | 20,945 | 11/19/2021 |
2.0.1.6 | 1,308 | 11/12/2021 |
2.0.1.5 | 4,248 | 9/13/2021 |
2.0.1.4 | 25,131 | 5/20/2021 |
2.0.1.3 | 4,373 | 3/11/2021 |
2.0.1.2 | 1,108 | 3/11/2021 |
2.0.1.1 | 1,077 | 3/10/2021 |
2.0.1 | 1,098 | 3/10/2021 |
1.3.2.7 | 8,762 | 12/2/2020 |
1.3.2.6 | 2,705 | 11/23/2020 |
1.3.2.5 | 2,049 | 11/15/2020 |
1.3.2.4 | 1,382 | 11/6/2020 |
1.3.2.3 | 5,288 | 9/10/2020 |
1.3.2.2 | 23,223 | 6/10/2020 |
1.3.2.1 | 9,256 | 5/8/2020 |
1.3.2 | 73,725 | 12/3/2019 |
1.3.1 | 11,531 | 10/27/2019 |
1.3.0 | 1,227 | 10/7/2019 |
1.2.1 | 4,052 | 9/21/2019 |
1.2.0 | 2,186 | 8/10/2019 |
1.1.0 | 763,547 | 7/30/2019 |
1.0.12 | 1,244 | 7/6/2019 |
1.0.11 | 1,366 | 6/12/2019 |
1.0.10 | 5,197 | 3/10/2019 |
1.0.9 | 16,917 | 9/11/2017 |
1.0.8 | 6,262 | 12/12/2016 |
Strong naming