/* * Copyright (c) 2024 ETH Zürich, IT Services * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ using System; using System.Collections.Generic; using SafeExamBrowser.Settings.Logging; namespace SafeExamBrowser.Logging.Contracts { /// /// Defines the functionality of the logger. /// public interface ILogger { /// /// The currently active severity threshold. All messages with a lower severity won't be logged! /// LogLevel LogLevel { get; set; } /// /// Logs the given message with severity . /// /// void Debug(string message); /// /// Logs the given message with severity . /// /// void Info(string message); /// /// Logs the given message with severity . /// /// void Warn(string message); /// /// Logs the given message with severity . /// /// void Error(string message); /// /// Logs the given message with severity and includes /// information about the specified exception (i.e. type, message and stacktrace). /// /// void Error(string message, Exception exception); /// /// Logs the given message as raw text. /// /// void Log(string message); /// /// Subscribes an observer to the application log. /// /// void Subscribe(ILogObserver observer); /// /// Unsubscribes an observer from the application log. /// void Unsubscribe(ILogObserver observer); /// /// Returns a copy of the current log content. /// IList GetLog(); } }