Dreamine.Logging
1.0.2
Dreamine.Logging 프로젝트의 API와 구성 요소를 제공합니다.
Toggle main menu visibility
로딩중...
검색중...
일치하는것 없음
DreamineLogEntry.cs
이 파일의 문서화 페이지로 가기
1
using
System;
2
3
namespace
Dreamine.Logging.Models
;
4
13
public
sealed
class
DreamineLogEntry
14
{
23
public
DateTimeOffset
Timestamp
{
get
; }
24
33
public
DreamineLogLevel
Level
{
get
; }
34
43
public
string
Category
{
get
; }
44
53
public
string
Message
{
get
; }
54
63
public
Exception
?
Exception
{
get
; }
64
73
public
int
ThreadId
{
get
; }
74
83
public
string
TimestampText
=>
Timestamp
.ToString(
"yyyy-MM-dd HH:mm:ss.fff"
);
84
93
public
string
DisplayText
94
{
95
get
96
{
97
var text = $
"[{TimestampText}] [{Level}] [{Category}] [T{ThreadId}] {Message}"
;
98
99
if
(
Exception
is
null
)
100
{
101
return
text;
102
}
103
104
return
text + Environment.NewLine +
Exception
;
105
}
106
}
107
164
public
DreamineLogEntry
(
165
DateTimeOffset timestamp,
166
DreamineLogLevel
level,
167
string
category,
168
string
message,
169
Exception
? exception,
170
int
threadId)
171
{
172
Timestamp
= timestamp;
173
Level
= level;
174
Category
=
string
.IsNullOrWhiteSpace(category) ?
"Dreamine"
: category;
175
Message
= message ??
string
.Empty;
176
Exception
= exception;
177
ThreadId
= threadId;
178
}
179
}
Dreamine.Logging.Models
Definition
DreamineLogEntry.cs:3
Dreamine.Logging.Models.DreamineLogLevel
DreamineLogLevel
Definition
DreamineLogLevel.cs:12
Dreamine.Logging.Models.DreamineLogEntry.ThreadId
int ThreadId
Definition
DreamineLogEntry.cs:73
Dreamine.Logging.Models.DreamineLogEntry.TimestampText
string TimestampText
Definition
DreamineLogEntry.cs:83
Dreamine.Logging.Models.DreamineLogEntry.Category
string Category
Definition
DreamineLogEntry.cs:43
Dreamine.Logging.Models.DreamineLogEntry.DreamineLogEntry
DreamineLogEntry(DateTimeOffset timestamp, DreamineLogLevel level, string category, string message, Exception? exception, int threadId)
Definition
DreamineLogEntry.cs:164
Dreamine.Logging.Models.DreamineLogEntry.DisplayText
string DisplayText
Definition
DreamineLogEntry.cs:94
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
Models
DreamineLogEntry.cs
다음에 의해 생성됨 :
1.17.0