sharee.bike-App/SharedBusinessLogic/Model/Logging/AppAndEnvironmentInfo.cs

17 lines
585 B
C#
Raw Normal View History

2022-09-16 11:19:46 +02:00
using System;
using Serilog;
2024-04-09 12:53:23 +02:00
using ShareeBike.Model.Device;
2022-09-16 11:19:46 +02:00
2024-04-09 12:53:23 +02:00
namespace ShareeBike.Model.Logging
2022-09-16 11:19:46 +02:00
{
public class AppAndEnvironmentInfo
{
public void LogHeader(ISmartDevice device, AppFlavor appFlavor, Version appVersion)
{
Log.ForContext<AppAndEnvironmentInfo>().Information($"App: {appFlavor.GetDisplayName()}, version {appVersion}");
Log.ForContext<AppAndEnvironmentInfo>().Information($"OS: {device.Platform}, version: {device.VersionText}");
Log.ForContext<AppAndEnvironmentInfo>().Information($"Device: {device.Model}, manufacturer: {device.Manufacturer}");
}
}
}