Documentation
¶
Index ¶
- Constants
- Variables
- func Compress(filename string, suffix string, del bool) error
- func CreatePidFile(path string) error
- func FileExists(name string) (os.FileInfo, bool)
- func Glob(dir, pattern string, beforeTime time.Time) ([]string, error)
- func ProcessExist(pid int) bool
- func ProfileMEM(name string) error
- func ReadPidFromFile(path string) (int, error)
- func StartProfileCPU(name string) (*os.File, error)
- func StopProfileCPU(fd *os.File)
- type Logger
- type LoggerImp
- func (l *LoggerImp) Debug(format string, v ...interface{})
- func (l *LoggerImp) Error(format string, v ...interface{})
- func (l *LoggerImp) Fatal(format string, v ...interface{})
- func (l *LoggerImp) Info(format string, v ...interface{})
- func (l *LoggerImp) SetLevel(level int)
- func (l *LoggerImp) SetLogger(handlerType string, config map[string]interface{}) error
- func (l *LoggerImp) Warn(format string, v ...interface{})
Constants ¶
View Source
const ( DebugLevel = iota InfoLevel WarnLevel ErrorLevel FatalLevel )
View Source
const ( KB MB GB TB PB )
Variables ¶
View Source
var ( ErrProcessExist = errors.New("same process is exists") ErrExit = errors.New("process will exit") )
Functions ¶
func CreatePidFile ¶
CreatePidFile return err when other process is exist or other error ref https://github.com/tabalt/pidfile
func ProcessExist ¶
func ProfileMEM ¶
func ReadPidFromFile ¶
func StopProfileCPU ¶
Types ¶
type Logger ¶
type Logger interface { SetLogger(handlerType string, config map[string]interface{}) error SetLevel(level int) Debug(format string, v ...interface{}) Info(format string, v ...interface{}) Warn(format string, v ...interface{}) Error(format string, v ...interface{}) Fatal(format string, v ...interface{}) }
no need add newline after msg
Click to show internal directories.
Click to hide internal directories.