Click or drag to resize
Welcome to Portable syslog
Introduction

Portable syslog is a fork of SyslogNet, ported and documented as part of the YALLA.NET project.

Note Note
Be sure to check out YALLA.NET, which might prove a more versatile answer to your logging requirements. Better yet, it's absolutely free!
Platforms
  • .NET Framework 4.5
  • Windows Store
  • Windows Phone Silverlight 8
  • Windows Phone 8.1
  • Xamarin.Android
  • Xamarin.iOS
  • Xamarin.Mac
  • Portable Class Libraries
Serializers
Transports
Installation

Enter the following command into the Package Manager Console:

Install-Package Portable.Syslog

The current version is Version 0.4.0.

Note Note
The package must be installed in the main project in order for the underlying network library to resolve to the specific platform version.
Usage
C#
var process = Process.GetCurrentProcess();

var message = new SyslogMessage(DateTime.Now,
    facility: Facility.UserLevelMessages,
    severity: Severity.Debug,
    hostName: process.MachineName,
    procId:   process.Id.ToString(),
    appName:  process.ProcessName,
    msgId:    "Hello",
    message:  "Hello, syslog");

using (var sender = new AsyncSyslogTcpSender(hostname, port))
{
    await sender.ConnectAsync();
    await sender.SendAsync(message, SyslogRfc5424MessageSerializer.Default);
    await sender.DisconnectAsync();
}
Notice
  • Copyright © 2013 Andrew Smith
  • Portable.Text.Encoding © 2014-2015 Xamarin Inc.
  • Portable syslog © 2015 Dmitry Shechtman
  • Permission is hereby granted, free of charge, to any person obtaining a copy
  • of this software and associated documentation files (the "Software"), to deal
  • in the Software without restriction, including without limitation the rights
  • to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  • copies of the Software, and to permit persons to whom the Software is
  • furnished to do so, subject to the following conditions:
  • The above copyright notice and this permission notice shall be included in
  • all copies or substantial portions of the Software.
  • THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  • IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  • FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  • AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  • LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  • OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  • THE SOFTWARE.
See Also