Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
| nanoFramework.Logging.Serial (preview) | [![Build Status](https://dev.azure.com/nanoframework/nanoframework.Logging/_apis/build/status/nanoframework.nanoFramework.Logging?branchName=develop)](https://dev.azure.com/nanoframework/nanoframework.Logging/_build/latest?definitionId=71&branchName=develop) | [![NuGet](https://img.shields.io/nuget/vpre/nanoFramework.Logging.Serial.svg?label=NuGet&style=flat&logo=nuget)](https://www.nuget.org/packages/nanoFramework.Logging.Serial/) |
| nanoFramework.Logging.Stream | [![Build Status](https://dev.azure.com/nanoframework/nanoframework.Logging/_apis/build/status/nanoframework.nanoFramework.Logging?branchName=main)](https://dev.azure.com/nanoframework/nanoframework.Logging/_build/latest?definitionId=71&branchName=main) | [![NuGet](https://img.shields.io/nuget/v/nanoFramework.Logging.Stream.svg?label=NuGet&style=flat&logo=nuget)](https://www.nuget.org/packages/nanoFramework.Logging.Stream/) |
| nanoFramework.Logging.Stream (preview) | [![Build Status](https://dev.azure.com/nanoframework/nanoframework.Logging/_apis/build/status/nanoframework.nanoFramework.Logging?branchName=develop)](https://dev.azure.com/nanoframework/nanoframework.Logging/_build/latest?definitionId=71&branchName=develop) | [![NuGet](https://img.shields.io/nuget/vpre/nanoFramework.Logging.Stream.svg?label=NuGet&style=flat&logo=nuget)](https://www.nuget.org/packages/nanoFramework.Logging.Stream/) |
| nanoFramework.Logging.Syslog | [![Build Status](https://dev.azure.com/nanoframework/nanoframework.Logging/_apis/build/status/nanoframework.nanoFramework.Logging?branchName=main)](https://dev.azure.com/nanoframework/nanoframework.Logging/_build/latest?definitionId=71&branchName=main) | [![NuGet](https://img.shields.io/nuget/v/nanoFramework.Logging.Syslog.svg?label=NuGet&style=flat&logo=nuget)](https://www.nuget.org/packages/nanoFramework.Logging.Syslog/) |
| nanoFramework.Logging.Syslog (preview) | [![Build Status](https://dev.azure.com/nanoframework/nanoframework.Logging/_apis/build/status/nanoframework.nanoFramework.Logging?branchName=develop)](https://dev.azure.com/nanoframework/nanoframework.Logging/_build/latest?definitionId=71&branchName=develop) | [![NuGet](https://img.shields.io/nuget/vpre/nanoFramework.Logging.Syslog.svg?label=NuGet&style=flat&logo=nuget)](https://www.nuget.org/packages/nanoFramework.Logging.Syslog/) |


## Feedback and documentation
Expand Down
42 changes: 42 additions & 0 deletions nanoFramework.Logging.Syslog.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>nanoFramework.Logging.Syslog</id>
<version>$version$</version>
<title>nanoFramework.Logging.Syslog</title>
<authors>nanoFramework project contributors</authors>
<owners>nanoFramework,dotnetfoundation</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<license type="file">LICENSE.md</license>
<releaseNotes>
</releaseNotes>
<readme>docs\README.md</readme>
<developmentDependency>false</developmentDependency>
<projectUrl>https://github.com/nanoframework/nanoFramework.Logging</projectUrl>
<icon>images\nf-logo.png</icon>
<repository type="git" url="https://github.com/nanoframework/nanoFramework.Logging" commit="$commit$" />
<copyright>Copyright (c) .NET Foundation and Contributors</copyright>
<description>This package includes the nanoFramework.Logging.Syslog assembly (Syslog Logging only) for .NET nanoFramework C# projects.
There is also a package with the Serial Logging, another with Stream Logging only and another with the basic Debug Logging.</description>
<tags>nanoFramework C# csharp netmf netnf nanoFramework.Logging.Syslog</tags>
<dependencies>
<dependency id="nanoFramework.CoreLibrary" version="1.12.0-preview.1" />
<dependency id="nanoFramework.Runtime.Events" version="1.10.0-preview.4" />
<dependency id="nanoFramework.System.Text" version="1.1.3-preview.7" />
<dependency id="nanoFramework.System.Net" version="1.8.0-preview.15" />
<dependency id="nanoFramework.System.Threading" version="1.0.4-preview.8" />
<dependency id="nanoFramework.Logging" version="$version$" />
</dependencies>
</metadata>
<files>
<file src="nanoFramework.Logging.Syslog\bin\Release\nanoFramework.Logging.Syslog.dll" target="lib\nanoFramework.Logging.Syslog.dll" />
<file src="nanoFramework.Logging.Syslog\bin\Release\nanoFramework.Logging.Syslog.pdb" target="lib\nanoFramework.Logging.Syslog.pdb" />
<file src="nanoFramework.Logging.Syslog\bin\Release\nanoFramework.Logging.Syslog.pdbx" target="lib\nanoFramework.Logging.Syslog.pdbx" />
<file src="nanoFramework.Logging.Syslog\bin\Release\nanoFramework.Logging.Syslog.pe" target="lib\nanoFramework.Logging.Syslog.pe" />
<file src="nanoFramework.Logging.Syslog\bin\Release\nanoFramework.Logging.Syslog.xml" target="lib\nanoFramework.Logging.Syslog.xml" />
<file src="assets\readme.txt" target="" />
<file src="README.md" target="docs\" />
<file src="assets\nf-logo.png" target="images" />
<file src="LICENSE.md" target="" />
</files>
</package>
110 changes: 110 additions & 0 deletions nanoFramework.Logging.Syslog/Facility.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
//
// Copyright (c) .NET Foundation and Contributors
// See LICENSE file in the project root for full license information.
//

namespace nanoFramework.Logging.Syslog
{
/// <summary>
/// Available facility types (RFC 3164).
/// </summary>
public enum Facility
{
/// <summary>
/// kernel messages
/// </summary>
Kern = 0,
/// <summary>
/// user-level messages
/// </summary>
User = 1,
/// <summary>
/// mail system
/// </summary>
Mail = 2,
/// <summary>
/// system daemons
/// </summary>
Daemon = 3,
/// <summary>
/// security/authorization messages
/// </summary>
Auth = 4,
/// <summary>
/// messages generated internally by syslogd
/// </summary>
Syslog = 5,
/// <summary>
/// line printer subsystem
/// </summary>
LPR = 6,
/// <summary>
/// network news subsystem
/// </summary>
News = 7,
/// <summary>
/// UUCP subsystem
/// </summary>
UUCP = 8,
/// <summary>
/// clock daemon
/// </summary>
Cron = 9,
/// <summary>
/// security/authorization messages
/// </summary>
AuthPriv = 10,
/// <summary>
/// FTP daemon
/// </summary>
FTP = 11,
/// <summary>
/// NTP subsystem
/// </summary>
NTP = 12,
/// <summary>
/// log audit
/// </summary>
Audit = 13,
/// <summary>
/// log alert
/// </summary>
Audit2 = 14,
/// <summary>
/// clock daemon
/// </summary>
Cron2 = 15,
/// <summary>
/// local use 0 (local0)
/// </summary>
Local0 = 16,
/// <summary>
/// local use 1 (local1)
/// </summary>
Local1 = 17,
/// <summary>
/// local use 2 (local2)
/// </summary>
Local2 = 18,
/// <summary>
/// local use 3 (local3)
/// </summary>
Local3 = 19,
/// <summary>
/// local use 4 (local4)
/// </summary>
Local4 = 20,
/// <summary>
/// local use 5 (local5)
/// </summary>
Local5 = 21,
/// <summary>
/// local use 6 (local6)
/// </summary>
Local6 = 22,
/// <summary>
/// local use 7 (local7)
/// </summary>
Local7 = 23
}
}
22 changes: 22 additions & 0 deletions nanoFramework.Logging.Syslog/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("nanoFramework.Logging")]
[assembly: AssemblyCompany("nanoFramework Contributors")]
[assembly: AssemblyProduct("nanoFramework.Logging")]
[assembly: AssemblyCopyright("Copyright (c) .NET Foundation and Contributors")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

/////////////////////////////////////////////////////////////////
// This attribute is mandatory when building Interop libraries //
// update this whenever the native assembly signature changes //
[assembly: AssemblyNativeVersion("1.0.0.0")]
/////////////////////////////////////////////////////////////////
52 changes: 52 additions & 0 deletions nanoFramework.Logging.Syslog/Severity.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
//
// Copyright (c) .NET Foundation and Contributors
// See LICENSE file in the project root for full license information.
//

using Microsoft.Extensions.Logging;

namespace nanoFramework.Logging.Syslog
{
/// <summary>
/// Severity represents the Severity in the Syslog messages. This corresponds to the values defined in RFC 3164 except None which means that the message won't be sent.
/// </summary>
public enum Severity
{
/// <summary>
/// Not an official RFC3164 facility. No entry will be generated when called with this Severity
/// </summary>
None = -1,
/// <summary>
/// Emergency: system is unusable. No equivalent in <see cref="LogLevel"/>
/// </summary>
Emergency,
/// <summary>
/// Alert: action must be taken immediately. No equivalent in <see cref="LogLevel"/>
/// </summary>
Alert,
/// <summary>
/// Critical: critical conditions. Mapped to <see cref="LogLevel.Critical"/>
/// </summary>
Critical,
/// <summary>
/// Error: error conditions. Mapped to <see cref="LogLevel.Error"/>
/// </summary>
Error,
/// <summary>
/// Warning: warning conditions. Mapped to <see cref="LogLevel.Warning"/>
/// </summary>
Warning,
/// <summary>
/// Notice: normal but significant condition. No equivalent in <see cref="LogLevel"/>
/// </summary>
Notice,
/// <summary>
/// Informational: informational messages. Mapped to <see cref="LogLevel.Information"/>
/// </summary>
Informational,
/// <summary>
/// Debug: debug-level messages. Mapped to <see cref="LogLevel.Debug"/> and <see cref="LogLevel.Trace"/>
/// </summary>
Debug
};
}
Loading