Dreamine.Logging
1.0.2
Dreamine.Logging 프로젝트의 API와 구성 요소를 제공합니다.
Toggle main menu visibility
로딩중...
검색중...
일치하는것 없음
DreamineTextLogFormatter.cs
이 파일의 문서화 페이지로 가기
1
using
System;
2
using
System.Text;
3
using
Dreamine.Logging.Interfaces
;
4
using
Dreamine.Logging.Models
;
5
6
namespace
Dreamine.Logging.Formatters
7
{
16
public
sealed
class
DreamineTextLogFormatter
:
IDreamineLogFormatter
17
{
50
public
string
Format
(
DreamineLogEntry
entry)
51
{
52
ArgumentNullException.ThrowIfNull(entry);
53
54
var builder =
new
StringBuilder();
55
56
builder.Append(
'['
)
57
.Append(entry.
Timestamp
.ToString(
"yyyy-MM-dd HH:mm:ss.fff"
))
58
.Append(
"] ["
)
59
.Append(entry.
Level
)
60
.Append(
"] ["
)
61
.Append(entry.
Category
)
62
.Append(
"] [T"
)
63
.Append(entry.
ThreadId
)
64
.Append(
"] "
)
65
.Append(entry.
Message
);
66
67
if
(entry.
Exception
is not
null
)
68
{
69
builder.AppendLine();
70
builder.Append(entry.
Exception
);
71
}
72
73
return
builder.ToString();
74
}
75
}
76
}
Dreamine.Logging.Formatters
Definition
DreamineTextLogFormatter.cs:7
Dreamine.Logging.Interfaces
Definition
IDreamineLogFormatter.cs:3
Dreamine.Logging.Models
Definition
DreamineLogEntry.cs:3
Dreamine.Logging.Formatters.DreamineTextLogFormatter
Definition
DreamineTextLogFormatter.cs:17
Dreamine.Logging.Formatters.DreamineTextLogFormatter.Format
string Format(DreamineLogEntry entry)
Definition
DreamineTextLogFormatter.cs:50
Dreamine.Logging.Interfaces.IDreamineLogFormatter
Definition
IDreamineLogFormatter.cs:14
Dreamine.Logging.Models.DreamineLogEntry
Definition
DreamineLogEntry.cs:14
Dreamine.Logging.Models.DreamineLogEntry.ThreadId
int ThreadId
Definition
DreamineLogEntry.cs:73
Dreamine.Logging.Models.DreamineLogEntry.Category
string Category
Definition
DreamineLogEntry.cs:43
Dreamine.Logging.Models.DreamineLogEntry.Message
string Message
Definition
DreamineLogEntry.cs:53
Dreamine.Logging.Models.DreamineLogEntry.Timestamp
DateTimeOffset Timestamp
Definition
DreamineLogEntry.cs:23
Dreamine.Logging.Models.DreamineLogEntry.Level
DreamineLogLevel Level
Definition
DreamineLogEntry.cs:33
Dreamine.Logging.Models.DreamineLogEntry.Exception
Exception? Exception
Definition
DreamineLogEntry.cs:63
Formatters
DreamineTextLogFormatter.cs
다음에 의해 생성됨 :
1.17.0