1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-05 23:53:33 +00:00
Files
mobile/src/Android/Services/AndroidLogService.cs
Federico Maccaroni db7ca3b93e BEEEP: Abstract and Centralize Logging (#1663)
* Abstracted App Center Logging into its own component, so that we can have it centralized in one place and we avoid checking for FDroid on all the places we want to use it

* Implemented the new logger where Crashes.TrackError was being used except on some specific cases

* Improved logging, added a debug logger and removed AppCenter to be used on DEBUG
2022-03-02 14:15:16 -03:00

31 lines
804 B
C#

using Bit.Core.Abstractions;
using System;
namespace Bit.Core.Services
{
public class AndroidLogService : INativeLogService
{
private static readonly string _tag = "BITWARDEN";
public void Debug(string message)
{
Android.Util.Log.WriteLine(Android.Util.LogPriority.Debug, _tag, message);
}
public void Info(string message)
{
Android.Util.Log.WriteLine(Android.Util.LogPriority.Info, _tag, message);
}
public void Warning(string message)
{
Android.Util.Log.WriteLine(Android.Util.LogPriority.Warn, _tag, message);
}
public void Error(string message)
{
Android.Util.Log.WriteLine(Android.Util.LogPriority.Error, _tag, message);
}
}
}