config

package
v0.0.0-...-aed9658 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GlobalConfig = &Config{
	Log: Log{
		DisableTimestamp: false,
		Level:            "info",
		Format:           "text",
		FileName:         "/tmp/thor-storage/data.log",
		MaxSize:          20,
	},
}

Functions

This section is empty.

Types

type Config

type Config struct {
	Log Log `json:"log" toml:"log"`
}

func (*Config) Load

func (c *Config) Load(path string, override func(cfg *Config)) error

func (*Config) String

func (cg *Config) String() string

type Log

type Log struct {
	DisableTimestamp bool   `json:"disable-timestamp" toml:"disable-timestamp"`
	Level            string `json:"level" toml:"level"`
	Format           string `json:"format" toml:"format"`
	FileName         string `json:"filename" toml:"filename"`
	MaxSize          int    `json:"maxsize" toml:"maxsize"`
}

Log 日志配置项

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL