modulepackage
0.0.0-20241031112902-11a1b39c3b5b
Repository: https://github.com/ondi/go-log.git
Documentation: pkg.go.dev
# README
package main
import "github.com/ondi/go-log"
func main() {
LogLevel := 0
LogFile := "app.log"
LogDate := "2006-01-02 15:04:05"
LogSize := 10 * 1024 * 1024
LogBackup := 5
logger := log.NewLogger("stderr", log.WhatLevel(LogLevel), log.NewStderr(&log.DTFL_t{Format: LogDate, Depth: 4}))
log.SetLogger(logger)
if len(LogFile) > 0 {
if log_file, err := log.NewFileBytes(LogFile, &log.DTFL_t{Format: LogDate, Depth: 4}, LogSize, LogBackup); err == nil {
logger.AddOutput("logfile", log.WhatLevel(LogLevel), log_file)
}
}
log.Info("%v", "test")
}
# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Default MaxIdleConns: 100, MaxIdleConnsPerHost: 2,.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
use NewLevelMap().
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
example 1000 rps:
ttl = time.Second
buckets = 100
rps_limit=1000
*/.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
{"index":{"_index":"logs-2022-01","_type":"_doc"}}.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Interfaces
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author