mirror of
https://github.com/bitwarden/mobile.git
synced 2024-06-25 10:26:02 +02:00
* PS-518 - Add setting to block AppCenter / Analytics - Mobile - Added another entry into Settings page under the Others section - Added prompt to ask user to enable / disable Crash Reports - Added compilation tags to remove if the build is FDroid * PS-518 Add setting to block AppCenter / Analytics - Mobile - Reduced FDroid compilation tags throughout the code - Added Init, Enable and State methods to Logger - Simplified SettingsPageViewModel Enable/Disable code * PS-518 Add setting to block AppCenter / Analytics - Mobile - Appcenter references were removed from App project, - Removed FDroid build.yml code that was deleting Appcenter packages from App.csproj Co-authored-by: André Bispo <abispo@bitwarden.com>
45 lines
1.4 KiB
C#
45 lines
1.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Bit.Core.Abstractions
|
|
{
|
|
public interface ILogger
|
|
{
|
|
/// <summary>
|
|
/// Place necessary code to initiaze logger
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
Task InitAsync();
|
|
|
|
/// <summary>
|
|
/// Returns if the current logger is enable or disable.
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
Task<bool> IsEnabled();
|
|
|
|
/// <summary>
|
|
/// Changes the state of the current logger. Setting state enabled to false will block logging.
|
|
/// </summary>
|
|
Task SetEnabled(bool value);
|
|
|
|
/// <summary>
|
|
/// Logs something that is not in itself an exception, e.g. a wrong flow or value that needs to be reported
|
|
/// and looked into.
|
|
/// </summary>
|
|
/// <param name="message">A text to be used as the issue's title</param>
|
|
/// <param name="extraData">Additional data</param>
|
|
void Error(string message,
|
|
IDictionary<string, string> extraData = null,
|
|
[CallerMemberName] string memberName = "",
|
|
[CallerFilePath] string sourceFilePath = "",
|
|
[CallerLineNumber] int sourceLineNumber = 0);
|
|
|
|
/// <summary>
|
|
/// Logs an exception
|
|
/// </summary>
|
|
void Exception(Exception ex);
|
|
}
|
|
}
|