Documentation
¶
Index ¶
Constants ¶
View Source
const ( Ltime = 1 << iota // time format "2006/01/02 15:04:05" Llongfile // full file name and line number: /a/b/c/d.go:23 Lshortfile // final file name element and line number: d.go:23. overrides Llongfile LstdFlags = Ltime | Lshortfile )
Variables ¶
This section is empty.
Functions ¶
func Debug ¶
func Debug(format string, args ...interface{})
Форматированный вывод отладочной информации.
Types ¶
type Config ¶
type Config struct {
// Разрешение на вывод отладочной информации.
Debug bool
Out io.Writer
// Формат ведения лога сообщений о ошибке. Возможные значения:
// std - вывод лога в поток io.Writer (значение по умолчанию os.Stderr),
// net - отправка сообщений на сервер RPC,
// file - запись в текстовый файл.
Format string
// Путь к лог файлу.
LogFile string
}
type Logger ¶
type Logger struct {
Debug bool // вывод в терминал отладочной информации
Ctx context.Context
Cancel context.CancelFunc
ChMsg chan *Message
ChLen chan int
Closer bool
// contains filtered or unexported fields
}
type Message ¶
type Message struct {
File string `db:"file" json:"file"`
Line int `db:"line" json:"line"`
Fnct string `db:"function" json:"fnct"`
Msg []byte `db:"message" json:"msg"`
Qry []byte `db:"query" json:"query"`
Date int64 `db:"date" json:"date"`
}
Click to show internal directories.
Click to hide internal directories.