SyslogLogging 2.0.6
dotnet add package SyslogLogging --version 2.0.6
NuGet\Install-Package SyslogLogging -Version 2.0.6
<PackageReference Include="SyslogLogging" Version="2.0.6" />
paket add SyslogLogging --version 2.0.6
#r "nuget: SyslogLogging, 2.0.6"
// Install SyslogLogging as a Cake Addin #addin nuget:?package=SyslogLogging&version=2.0.6 // Install SyslogLogging as a Cake Tool #tool nuget:?package=SyslogLogging&version=2.0.6
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.x
- 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
Easiest Way Possible
Using the constructor with no parameters will cause the library to log to 127.0.0.1:514
.
using SyslogLogging;
LoggingModule log = new LoggingModule();
log.Debug("Hello, world!");
Single Syslog Server
using SyslogLogging;
LoggingModule log = new LoggingModule("mysyslogserver", 514);
log.Debug("Hello, world!");
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.
Changing Console Message Color
Colors are disabled by default to ensure compatibility across different operating systems and environments.
If you wish to enable colors and change the colors used by the library, set Settings.EnableColors
to true
and 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 | 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 is compatible. 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. |
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages (12)
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 | 342 | 10/17/2024 |
2.0.5 | 272 | 9/10/2024 |
2.0.4 | 128 | 9/10/2024 |
2.0.3 | 117 | 9/10/2024 |
2.0.2 | 9,994 | 8/1/2023 |
2.0.1.8 | 9,153 | 10/6/2022 |
2.0.1.7 | 21,015 | 11/19/2021 |
2.0.1.6 | 1,320 | 11/12/2021 |
2.0.1.5 | 4,254 | 9/13/2021 |
2.0.1.4 | 25,146 | 5/20/2021 |
2.0.1.3 | 4,387 | 3/11/2021 |
2.0.1.2 | 1,116 | 3/11/2021 |
2.0.1.1 | 1,087 | 3/10/2021 |
2.0.1 | 1,105 | 3/10/2021 |
1.3.2.7 | 8,781 | 12/2/2020 |
1.3.2.6 | 2,711 | 11/23/2020 |
1.3.2.5 | 2,057 | 11/15/2020 |
1.3.2.4 | 1,389 | 11/6/2020 |
1.3.2.3 | 5,295 | 9/10/2020 |
1.3.2.2 | 23,231 | 6/10/2020 |
1.3.2.1 | 9,264 | 5/8/2020 |
1.3.2 | 73,733 | 12/3/2019 |
1.3.1 | 11,538 | 10/27/2019 |
1.3.0 | 1,234 | 10/7/2019 |
1.2.1 | 4,089 | 9/21/2019 |
1.2.0 | 2,194 | 8/10/2019 |
1.1.0 | 763,578 | 7/30/2019 |
1.0.12 | 1,250 | 7/6/2019 |
1.0.11 | 1,373 | 6/12/2019 |
1.0.10 | 5,205 | 3/10/2019 |
1.0.9 | 16,974 | 9/11/2017 |
1.0.8 | 6,270 | 12/12/2016 |
Strong naming