Skip to content

Commit 14914e4

Browse files
committed
[New] Logger
1 parent 614ae60 commit 14914e4

24 files changed

+689
-779
lines changed

src/redmine-net-api/Extensions/LoggerExtensions.cs

Lines changed: 0 additions & 52 deletions
This file was deleted.

src/redmine-net-api/Logging/ColorConsoleLogger.cs

Lines changed: 0 additions & 110 deletions
This file was deleted.

src/redmine-net-api/Logging/ConsoleLogger.cs

Lines changed: 0 additions & 56 deletions
This file was deleted.

src/redmine-net-api/Logging/ILogger.cs

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
using System;
2+
using System.Collections.Generic;
3+
4+
namespace Redmine.Net.Api.Logging;
5+
6+
/// <summary>
7+
/// Provides abstraction for logging operations
8+
/// </summary>
9+
public interface IRedmineLogger
10+
{
11+
/// <summary>
12+
/// Checks if the specified log level is enabled
13+
/// </summary>
14+
bool IsEnabled(LogLevel level);
15+
16+
/// <summary>
17+
/// Logs a message with the specified level
18+
/// </summary>
19+
void Log(LogLevel level, string message, Exception exception = null);
20+
21+
/// <summary>
22+
/// Creates a scoped logger with additional context
23+
/// </summary>
24+
IRedmineLogger CreateScope(string scopeName, IDictionary<string, object> scopeProperties = null);
25+
}

src/redmine-net-api/Logging/LogEntry.cs

Lines changed: 0 additions & 61 deletions
This file was deleted.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
namespace Redmine.Net.Api.Logging;
2+
3+
/// <summary>
4+
/// Defines logging severity levels
5+
/// </summary>
6+
public enum LogLevel
7+
{
8+
/// <summary>
9+
///
10+
/// </summary>
11+
Trace,
12+
/// <summary>
13+
///
14+
/// </summary>
15+
Debug,
16+
/// <summary>
17+
///
18+
/// </summary>
19+
Information,
20+
/// <summary>
21+
///
22+
/// </summary>
23+
Warning,
24+
/// <summary>
25+
///
26+
/// </summary>
27+
Error,
28+
/// <summary>
29+
///
30+
/// </summary>
31+
Critical
32+
}

0 commit comments

Comments
 (0)