实例化一个根据时间存储的日志组件,需要指定每个文件的存储时间范围
Instantiate a log component based on time, you need to specify the storage time range for each file
命名空间:
HslCommunication.LogNet
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法 public LogNetDateTime(
string filePath,
GenerateMode generateMode = GenerateMode.ByEveryYear,
int fileQuantity = -1
)
Public Sub New (
filePath As String,
Optional generateMode As GenerateMode = GenerateMode.ByEveryYear,
Optional fileQuantity As Integer = -1
)
public:
LogNetDateTime(
String^ filePath,
GenerateMode generateMode = GenerateMode::ByEveryYear,
int fileQuantity = -1
)
new :
filePath : string *
?generateMode : GenerateMode *
?fileQuantity : int
(* Defaults:
let _generateMode = defaultArg generateMode GenerateMode.ByEveryYear
let _fileQuantity = defaultArg fileQuantity -1
*)
-> LogNetDateTime
参数
- filePath
- 类型:SystemString
文件存储的路径 - generateMode (Optional)
- 类型:HslCommunication.LogNetGenerateMode
存储文件的间隔 - fileQuantity (Optional)
- 类型:SystemInt32
指定当前的日志文件数量上限,如果小于0,则不限制,文件一直增加,如果设置为10,就限制最多10个文件,会删除最近时间的10个文件之外的文件。
参见