Xamarin Android and iOS Device information enrichment for Serilog
Install-Package Serilog.Enrichers.Xamarin
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)
This project is licensed under the MIT License, see the LICENSE file for more information