Documentation ¶
Overview ¶
Package ini provides functions for parsing INI configuration files.
Index ¶
- Constants
- Variables
- func FileExist(filename string) bool
- func Get(name string) map[string]string
- func GetLogLevel() int
- func GetLogger(typ string) *log.Logger
- func InitLogLevel(lv int)
- func InitLogger(pathParam, logfile string, maxSize int64)
- func LogDebug(v ...interface{})
- func LogDebugc(calldepth int, v ...interface{})
- func LogDebugf(format string, v ...interface{})
- func LogErr(v ...interface{})
- func LogErrc(calldepth int, v ...interface{})
- func LogErrf(format string, v ...interface{})
- func LogFatal(v ...interface{})
- func LogFatalc(calldepth int, v ...interface{})
- func LogFatalf(format string, v ...interface{})
- func LogInfo(v ...interface{})
- func LogInfoc(calldepth int, v ...interface{})
- func LogInfof(format string, v ...interface{})
- func LogWarn(v ...interface{})
- func LogWarnc(calldepth int, v ...interface{})
- func LogWarnf(format string, v ...interface{})
- func OpenLogFile(name string, flag int, perm os.FileMode) (file *logFile, err error)
- func Reload()
- type ErrSyntax
- type File
- type Section
Constants ¶
View Source
const ( LOG_DEBUG = 0 LOG_INFO = 1 LOG_WARN = 2 LOG_ERROR = 3 LOG_FATAL = 4 )
View Source
const ( Llongfile = 1 << iota // log调用者路径 Lshortfile // log调用者文件名 Lfuncname // 调用函数名 LerrorExit // error log关闭程序 Lfilemask = Llongfile | Lshortfile | Lfuncname )
View Source
const ( LDM_NONE = 0 LDM_ALL = 1 LDM_QUEST = 2 LDM_LOGIN = 3 )
debug模块定义
Variables ¶
View Source
var (
LOGFILE_MAXSIZE_DEFAULT int64 = 50 << 20
)
Functions ¶
func GetLogLevel ¶
func GetLogLevel() int
func InitLogLevel ¶
func InitLogLevel(lv int)
func InitLogger ¶
func OpenLogFile ¶
Types ¶
type ErrSyntax ¶
type ErrSyntax struct { Line int Source string // The contents of the erroneous line, without leading or trailing whitespace }
ErrSyntax is returned when there is a syntax error in an INI file.
type File ¶
A File represents a parsed INI file.
func (File) Get ¶
Looks up a value for a key in a section and returns that value, along with a boolean result similar to a map lookup.
Click to show internal directories.
Click to hide internal directories.