TrackMan / serilog-enrichers-xamarin

Xamarin Android and iOS Device information enrichment for Serilog

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Serilog Enrichers for Xamarin

Build status NuGet

Xamarin Android and iOS Device information enrichment for Serilog

Installing

Install-Package Serilog.Enrichers.Xamarin

Usage

var configuration = new LoggerConfiguration()
    // Android
    .Enrich.WithDisplayMetrics()     // Adds `DisplayMetrics` property
    .Enrich.WithFirmwareVersion()    // Adds `FirmwareVersion` property
    .Enrich.WithHardwareVersion()    // Adds `HardwareVersion` property
    .Enrich.WithDeviceId()           // Adds `DeviceId` property
    .Enrich.WithDeviceName()         // Adds `DeviceName` property
    .Enrich.WithManufacturerName()   // Adds `DeviceManufacturer` property
    .Enrich.WithDeviceOrientation()  // Adds `DeviceOrientation` property (can be expensive since it is not cached)
    .Enrich.WithPackageName()        // Adds `PackageName` property
    .Enrich.WithPackageVersionName() // Adds `PackageVersionName` property
    .Enrich.WithPackageVersionCode() // Adds `PackageVersionCode` property
    
    // iOS
    .Enrich.WithDisplayMetrics()     // Adds `DisplayMetrics` property
    .Enrich.WithSystemVersion()      // Adds `DeviceSystemVersion` property
    .Enrich.WithDeviceModel()        // Adds `DisplayModel` property
    .Enrich.WithDeviceId()           // Adds `DisplayId` property
    .Enrich.WithDeviceName()         // Adds `DisplayName` property
    .Enrich.WithPackageName()        // Adds `PackageName` property (CFBundleName)
    .Enrich.WithPackageVersionName() // Adds `PackageVersionName` property (CFBundleShortVersionString)
    .Enrich.WithPackageVersionCode() // Adds `PackageVersionCode` property (CFBundleVersion)

License

This project is licensed under the MIT License, see the LICENSE file for more information

About

Xamarin Android and iOS Device information enrichment for Serilog

License:MIT License


Languages

Language:C# 73.3%Language:PowerShell 19.1%Language:Shell 7.6%