Documentation ¶
Index ¶
- Variables
- func CheckLog() bool
- func CloseHandle(hFile *os.File)
- func CloseLogFile()
- func CreateFile(szFilePath string) (*os.File, error)
- func CreateFileEx(szFilePath string, nPermission uint32) (*os.File, error)
- func GetCallerName(nCallDepth int) string
- func GetCurrWorkDir() (string, error)
- func GetFileSha1(hFile *os.File) *[]byte
- func GetFileSha1Ex(szPath string) *[]byte
- func IsDirExist(szPath string) (bool, error)
- func IsFileExist(szPath string) (bool, error)
- func IsFileExistEx(szPath string) (bool, *os.FileInfo, error)
- func MkDirFatal(szPath string, nPermission uint32, bMkDir bool)
- func Open(szPath string) (*os.File, error)
- func OpenFile(szFilePath string) (*os.File, error)
- func OpenLogFile(szPath string)
- func SetLogLevel(nLL uint32)
- func TurnLogFullOn()
- func TurnSysLogOff()
- func TurnSysLogOn()
- type LogLevel
- type LogMacroStr
- type LogMsgStr
- type Logger
- func (logInst Logger) DumpAudit(szMessage string)
- func (logInst Logger) DumpAuditEx(szMessage string, v ...interface{})
- func (logInst Logger) DumpDetail(szMessage string)
- func (logInst Logger) DumpDetailEx(szMessage string, v ...interface{})
- func (logInst Logger) DumpError(szMessage string)
- func (logInst Logger) DumpError2(szMessage string)
- func (logInst Logger) DumpError2Ex(szMessage string, v ...interface{})
- func (logInst Logger) DumpErrorEx(szMessage string, v ...interface{})
- func (logInst Logger) DumpInfo(szMessage string)
- func (logInst Logger) DumpInfoEx(szMessage string, v ...interface{})
- func (logInst Logger) DumpTrace(szMessage string)
- func (logInst Logger) DumpTraceEx(szMessage string, v ...interface{})
- func (logInst Logger) DumpWarning(szMessage string)
- func (logInst Logger) DumpWarningEx(szMessage string, v ...interface{})
- func (logInst Logger) Fatal(v ...interface{})
- func (logInst Logger) PrintAudit(v ...interface{})
- func (logInst Logger) PrintAuditEx(szMessage string, v ...interface{})
- func (logInst Logger) PrintDetail(v ...interface{})
- func (logInst Logger) PrintError(v ...interface{})
- func (logInst Logger) PrintError2(v ...interface{})
- func (logInst Logger) PrintInfo(v ...interface{})
- func (logInst Logger) PrintTrace(v ...interface{})
- func (logInst Logger) PrintWarning(v ...interface{})
Constants ¶
This section is empty.
Variables ¶
View Source
var LogMacro = LogMacroStr{
EqToStr: "=\"%s\" ",
Ptr: "%#p ",
Handle: "%p ",
TaskID: "%p ",
Error: "ERROR=\"%v\" ",
Name: "Name=\"%s\" ",
Path: "Path=\"%s\" ",
FMode: "FMode=\"%s\" ",
Key: "Key=\"%s\" ",
Value: "Value=\"%s\" ",
Hash: "Hash=\"%s\" ",
IP: "[%s] ",
Port: "Port=\"%s\"",
Pos: "Pos=%d",
}
LogMacro macro for log comments
View Source
var LogMsg = LogMsgStr{
NotFound: "NOT FOUND ",
DirIsFound: "dir is found ",
FileIsFound: "file is found ",
FileIsNotFound: "file is NOT FOUND ",
FileIsOpened: "file is opened ",
FileIsClosed: "file is closed ",
CanNotAccess: "can NOT access ",
Success: "success ",
Fail: "FAIL ",
PermissionDenied: "PERMISSION DENIED ",
Delete: "DELETE",
Download: "DOWNLOAD",
Upload: "UPLOAD",
HTTPStatusSeparator: " : ",
}
LogMsg message for log comments
Functions ¶
func CreateFile ¶
CreateFile opens the named file for reading and returns a file pointer
func CreateFileEx ¶
CreateFileEx opens the named file for reading and returns a file pointer
func GetCurrWorkDir ¶
GetCurrWorkDir returns a rooted path name corresponding to the current directory
func IsFileExistEx ¶
IsFileExistEx do smth
func MkDirFatal ¶
MkDirFatal do smth
Types ¶
type LogMacroStr ¶
type LogMacroStr struct { EqToStr string Ptr string Error string Handle string TaskID string Name string Path string FMode string Key string Value string Hash string IP string Port string Pos string }
LogMacroStr macro for log comments
type LogMsgStr ¶
type LogMsgStr struct { NotFound string DirIsFound string FileIsFound string FileIsNotFound string FileIsOpened string FileIsClosed string CanNotAccess string Success string Fail string PermissionDenied string Delete string Download string Upload string HTTPStatusSeparator string }
LogMsgStr message for log comments
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger do smth
func (Logger) DumpAuditEx ¶
DumpAuditEx do smth
func (Logger) DumpDetailEx ¶
DumpDetailEx do smth
func (Logger) DumpError2Ex ¶
DumpError2Ex do smth
func (Logger) DumpErrorEx ¶
DumpErrorEx do smth
func (Logger) DumpInfoEx ¶
DumpInfoEx do smth
func (Logger) DumpTraceEx ¶
DumpTraceEx do smth
func (Logger) DumpWarningEx ¶
DumpWarningEx do smth
func (Logger) PrintAuditEx ¶
PrintAuditEx do smth
func (Logger) PrintWarning ¶
func (logInst Logger) PrintWarning(v ...interface{})
PrintWarning do smth
Click to show internal directories.
Click to hide internal directories.