sharee.bike-App/TINKLib/Model/Logging/AppAndEnvironmentInfo.cs
2022-09-16 11:19:46 +02:00

16 lines
573 B
C#

using System;
using Serilog;
using TINK.Model.Device;
namespace TINK.Model.Logging
{
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}");
}
}
}