C# 클래스 CK.Monitoring.MonitorBinaryFileOutput

Helper class that encapsulates temporary stream and final renaming for log entries streams. This currently handles only the maximum count of entries per file but this may be extended with options like "SubFolderMode" that can be based on current time (to group logs inside timed intermediate folders like one per day: 2014/01/12 or 2014-01/12, etc.).
상속: MonitorFileOutputBase
파일 보기 프로젝트 열기: Invenietis/ck-core 1 사용 예제들

공개 메소드들

메소드 설명
MonitorBinaryFileOutput ( string configuredPath, System.Guid monitorId, int maxCountPerFile, bool useGzipCompression ) : System

Initializes a new file for ILogEntry issued from a specific monitor: the final file name is based on FileUtil.FileNameUniqueTimeUtcFormat with a "-{XXX...XXX}.ckmon" suffix where {XXX...XXX} is the unique identifier (Guid with the B format - 32 digits separated by hyphens, enclosed in braces) of the monitor. You must call Initialize before actually using this object.

MonitorBinaryFileOutput ( string configuredPath, int maxCountPerFile, bool useGzipCompression ) : System

Initializes a new file for IMulticastLogEntry: the final file name is based on FileUtil.FileNameUniqueTimeUtcFormat with a ".ckmon" extension. You must call Initialize before actually using this object.

UnicastWrite ( ActivityMonitorLogData data, IMulticastLogInfo adapter ) : void

Writes a line entry as a uni-cast compact entry or as a multi-cast one if needed.

UnicastWriteCloseGroup ( IActivityLogGroup g, IReadOnlyList conclusions, IMulticastLogInfo adapter ) : void

Writes a group closing entry as a uni-cast compact entry or as a multi-cast one if needed.

UnicastWriteOpenGroup ( IActivityLogGroup g, IMulticastLogInfo adapter ) : void

Writes a group opening entry as a uni-cast compact entry or as a multi-cast one if needed.

Write ( ILogEntry e ) : void

Writes a log entry (that can actually be a IMulticastLogEntry).

보호된 메소드들

메소드 설명
CloseCurrentFile ( ) : void

Called when the current file is closed.

OpenNewFile ( ) : Stream

Called when a new file is created.

메소드 상세

CloseCurrentFile() 보호된 메소드

Called when the current file is closed.
protected CloseCurrentFile ( ) : void
리턴 void

MonitorBinaryFileOutput() 공개 메소드

Initializes a new file for ILogEntry issued from a specific monitor: the final file name is based on FileUtil.FileNameUniqueTimeUtcFormat with a "-{XXX...XXX}.ckmon" suffix where {XXX...XXX} is the unique identifier (Guid with the B format - 32 digits separated by hyphens, enclosed in braces) of the monitor. You must call Initialize before actually using this object.
public MonitorBinaryFileOutput ( string configuredPath, System.Guid monitorId, int maxCountPerFile, bool useGzipCompression ) : System
configuredPath string The path. Can be absolute. When relative, it will be under that must be set.
monitorId System.Guid Monitor identifier.
maxCountPerFile int Maximum number of entries per file. Must be greater than 1.
useGzipCompression bool True to gzip the file.
리턴 System

MonitorBinaryFileOutput() 공개 메소드

Initializes a new file for IMulticastLogEntry: the final file name is based on FileUtil.FileNameUniqueTimeUtcFormat with a ".ckmon" extension. You must call Initialize before actually using this object.
public MonitorBinaryFileOutput ( string configuredPath, int maxCountPerFile, bool useGzipCompression ) : System
configuredPath string The path: it can be absolute and when relative, it will be under (that must be set).
maxCountPerFile int Maximum number of entries per file. Must be greater than 1.
useGzipCompression bool True to gzip the file.
리턴 System

OpenNewFile() 보호된 메소드

Called when a new file is created.
protected OpenNewFile ( ) : Stream
리턴 Stream

UnicastWrite() 공개 메소드

Writes a line entry as a uni-cast compact entry or as a multi-cast one if needed.
public UnicastWrite ( ActivityMonitorLogData data, IMulticastLogInfo adapter ) : void
data CK.Core.ActivityMonitorLogData The log line.
adapter IMulticastLogInfo Multi-cast information to be able to write multi-cast entry when needed.
리턴 void

UnicastWriteCloseGroup() 공개 메소드

Writes a group closing entry as a uni-cast compact entry or as a multi-cast one if needed.
public UnicastWriteCloseGroup ( IActivityLogGroup g, IReadOnlyList conclusions, IMulticastLogInfo adapter ) : void
g IActivityLogGroup The group.
conclusions IReadOnlyList Group's conclusions.
adapter IMulticastLogInfo Multi-cast information to be able to write multi-cast entry when needed.
리턴 void

UnicastWriteOpenGroup() 공개 메소드

Writes a group opening entry as a uni-cast compact entry or as a multi-cast one if needed.
public UnicastWriteOpenGroup ( IActivityLogGroup g, IMulticastLogInfo adapter ) : void
g IActivityLogGroup The group line.
adapter IMulticastLogInfo Multi-cast information to be able to write multi-cast entry when needed.
리턴 void

Write() 공개 메소드

Writes a log entry (that can actually be a IMulticastLogEntry).
public Write ( ILogEntry e ) : void
e ILogEntry The log entry.
리턴 void