Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLogStorage ¶
func NewLogStorage(opt *LogStorageOpt) (storage.LogStorage, error)
NewLogStorage 创建文件日志存储;同一根目录只能由一个进程写入。
Types ¶
type LogStorageOpt ¶
type LogStorageOpt struct {
// RootDirectory 是保存日志文件的根目录,必须是绝对路径。
RootDirectory string
}
LogStorageOpt 是文件日志存储的配置,创建后只读。
func NewLogStorageOpt ¶
func NewLogStorageOpt(rootDirectory string) *LogStorageOpt
NewLogStorageOpt 创建以指定目录保存日志文件的配置。
Click to show internal directories.
Click to hide internal directories.