Dreamine.Logging 1.0.2
Dreamine.Logging 프로젝트의 API와 구성 요소를 제공합니다.
로딩중...
검색중...
일치하는것 없음
Dreamine.Logging.Registration.DreamineLoggingRegistration 클래스 참조

더 자세히 ...

클래스

class  LoggingShutdownHandle

정적 Public 멤버 함수

static IAsyncDisposable Register (Action< DreamineLoggingOptions >? configure=null)
static IAsyncDisposable Register (DreamineLoggingOptions options)

상세한 설명

Dreamine 로깅 서비스 등록 도우미를 제공합니다.

DreamineLoggingRegistration.cs 파일의 20 번째 라인에서 정의되었습니다.

멤버 함수 문서화

◆ Register() [1/2]

IAsyncDisposable Dreamine.Logging.Registration.DreamineLoggingRegistration.Register ( Action< DreamineLoggingOptions >? configure = null)
inlinestatic

구성 작업을 적용해 Dreamine 핵심 로깅 서비스를 등록합니다.

매개변수
configure선택적 로깅 구성 작업입니다.
반환값
해제 시 등록된 출력을 비우는 비동기 해제 핸들입니다.

DreamineLoggingRegistration.cs 파일의 46 번째 라인에서 정의되었습니다.

47 {
48 var options = new DreamineLoggingOptions();
49 configure?.Invoke(options);
50
51 return Register(options);
52 }

다음을 참조함 : Register().

다음에 의해서 참조됨 : Register().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ Register() [2/2]

IAsyncDisposable Dreamine.Logging.Registration.DreamineLoggingRegistration.Register ( DreamineLoggingOptions options)
inlinestatic

지정한 옵션으로 Dreamine 핵심 로깅 서비스를 등록합니다.

매개변수
options로깅 옵션입니다.
반환값
해제 시 등록된 출력을 비우는 비동기 해제 핸들입니다.
예외
ArgumentNullExceptionoptionsnull인 경우 발생합니다.

DreamineLoggingRegistration.cs 파일의 86 번째 라인에서 정의되었습니다.

87 {
88 ArgumentNullException.ThrowIfNull(options);
89
90 var logStore = new InMemoryLogStore(options.StoreCapacity);
91 var formatter = new DreamineTextLogFormatter();
92
93 var textFileSink = new TextFileLogSink(
94 options.LogDirectory,
95 formatter,
96 options.FlushEveryWriteCount);
97
98 var compositeSink = new CompositeLogSink(new IDreamineLogSink[]
99 {
100 logStore,
101 textFileSink
102 });
103
104 var asyncSink = new AsyncQueueSink(
105 compositeSink,
106 options.QueueCapacity,
107 options.DrainBatchSize);
108
109 var logger = new DreamineLogger(
110 new IDreamineLogSink[] { asyncSink },
111 DreamineLogLevel.Trace,
112 options.Category);
113
114 DMContainer.RegisterSingleton(logStore);
115 DMContainer.RegisterSingleton<IDreamineLogStore>(logStore);
116 DMContainer.RegisterSingleton<IDreamineLogFormatter>(formatter);
117 DMContainer.RegisterSingleton(asyncSink);
118 DMContainer.RegisterSingleton<IDreamineLogSink>(asyncSink);
119 DMContainer.RegisterSingleton<IDreamineLogger>(logger);
120
121 return new LoggingShutdownHandle(asyncSink, options.ShutdownTimeout);
122 }

다음을 참조함 : Dreamine.Logging.Options.DreamineLoggingOptions.Category, Dreamine.Logging.Options.DreamineLoggingOptions.DrainBatchSize, Dreamine.Logging.Options.DreamineLoggingOptions.FlushEveryWriteCount, Dreamine.Logging.Options.DreamineLoggingOptions.LogDirectory, Dreamine.Logging.Options.DreamineLoggingOptions.QueueCapacity, Dreamine.Logging.Options.DreamineLoggingOptions.ShutdownTimeout, Dreamine.Logging.Options.DreamineLoggingOptions.StoreCapacity.


이 클래스에 대한 문서화 페이지는 다음의 파일로부터 생성되었습니다.: