Please use. NET 5,. NET 6, NET 7,. NET 8, NET Framework 4.6, NET Framework 4.61, NET Framework 4.7, NET Framework 4.72, NET Framework 4.8, NET Framework 4.81, and. NET Core 3.1 versions

FileNamePatternConverter 类

Custom pattern converter that extracts just the filename from a full path for log messages

Definition

命名空间: DeploySharp.Log
程序集: DeploySharp (在 DeploySharp.dll 中) 版本:0.0.4+6e8a2e904469617cd59619d666c0e272985c0e33
C#
public class FileNamePatternConverter : PatternLayoutConverter
Inheritance
Object    PatternConverter    PatternLayoutConverter    FileNamePatternConverter

构造函数

FileNamePatternConverter初始化 FileNamePatternConverter 类的一个新实例

属性

FormattingInfo Gets or sets the formatting info for this converter
(继承自 PatternConverter。)
IgnoresException Flag indicating if this converter handles the logging event exception
(继承自 PatternLayoutConverter。)
Next Gets the next pattern converter in the chain.
(继承自 PatternConverter。)
Option Gets or sets the option value for this converter
(继承自 PatternConverter。)
Properties
(继承自 PatternConverter。)

方法

Convert(TextWriter, LoggingEvent) Converts the full file path to just the filename for logging output
(重写 PatternLayoutConverter.Convert(TextWriter, LoggingEvent))
Convert(TextWriter, Object) Derived pattern converters must override this method in order to convert conversion specifiers in the correct way.
(继承自 PatternLayoutConverter。)
EqualsDetermines whether the specified object is equal to the current object.
(继承自 Object。)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(继承自 Object。)
Format Write the pattern converter to the writer with appropriate formatting
(继承自 PatternConverter。)
GetHashCodeServes as the default hash function.
(继承自 Object。)
GetTypeGets the Type of the current instance.
(继承自 Object。)
MemberwiseCloneCreates a shallow copy of the current Object.
(继承自 Object。)
SetNext Set the next pattern converter in the chains
(继承自 PatternConverter。)
ToStringReturns a string that represents the current object.
(继承自 Object。)

参见