| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- using GreenTree.Nachtragsmanagement.Core;
- using GreenTree.Nachtragsmanagement.Core.Domain.Logging;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace GreenTree.Nachtragsmanagement.Services.Logging
- {
- public interface ILogger
- {
- /// <summary>
- /// Determines whether a log level is enabled
- /// </summary>
- /// <param name="level">Log level</param>
- bool IsEnabled(LogLevel level);
- /// <summary>
- /// Deletes a log item
- /// </summary>
- /// <param name="log">Log item</param>
- void DeleteLog(Log log);
- /// <summary>
- /// Clears a log
- /// </summary>
- void ClearLog();
- /// <summary>
- /// Gets all log items
- /// </summary>
- /// <returns>Log item collection</returns>
- IList<Log> GetAllLogs();
- /// <summary>
- /// Gets a log item
- /// </summary>
- /// <param name="logId">Log item identifier</param>
- /// <returns>Log item</returns>
- Log GetLogById(int logId);
- /// <summary>
- /// Get log items by identifiers
- /// </summary>
- /// <param name="logIds">Log item identifiers</param>
- /// <returns>Log items</returns>
- IList<Log> GetLogByIds(int[] logIds);
- /// <summary>
- /// Inserts a log item
- /// </summary>
- /// <param name="logLevel">Log level</param>
- /// <param name="shortMessage">The short message</param>
- /// <param name="fullMessage">The full message</param>
- /// <param name="user">The user to associate log record with</param>
- /// <returns>A log item</returns>
- Log InsertLog(LogLevel logLevel, string shortMessage, BaseEntity entity = null, string fullMessage = "",
- Core.Domain.User.User user = null);
- }
- }
|