mirror of
https://github.com/maubot/maubot.git
synced 2024-10-01 01:06:10 -04:00
Fix log file name format and remove old debug prints
This commit is contained in:
parent
2a0106da26
commit
a77084b12e
2
.gitignore
vendored
2
.gitignore
vendored
@ -5,6 +5,8 @@
|
||||
*.yaml
|
||||
!example-config.yaml
|
||||
|
||||
logs/
|
||||
|
||||
plugins/
|
||||
|
||||
# Bots under maubot.xyz
|
||||
|
@ -51,21 +51,18 @@ func (bot *Bot) Init() {
|
||||
bot.initServer()
|
||||
bot.loadPlugins()
|
||||
bot.createPlugins()
|
||||
log.Debugln("Init func exit")
|
||||
}
|
||||
|
||||
func (bot *Bot) Start() {
|
||||
go bot.startClients()
|
||||
go bot.startServer()
|
||||
bot.startPlugins()
|
||||
log.Debugln("Start func exit")
|
||||
}
|
||||
|
||||
func (bot *Bot) Stop() {
|
||||
bot.stopPlugins()
|
||||
bot.stopServer()
|
||||
bot.stopClients()
|
||||
log.Debugln("Stop func exit")
|
||||
}
|
||||
|
||||
func (bot *Bot) initDatabase() {
|
||||
|
@ -82,7 +82,7 @@ func (lc *LogConfig) MarshalYAML() (interface{}, error) {
|
||||
func CreateLogConfig() LogConfig {
|
||||
return LogConfig{
|
||||
Directory: "./logs",
|
||||
FileNameFormat: "%[1]s-%02[2]d.log",
|
||||
FileNameFormat: "{{.Date}}-{{.Index}}.log",
|
||||
TimestampFormat: "Jan _2, 2006 15:04:05",
|
||||
FileMode: 0600,
|
||||
FileDateFormat: "2006-01-02",
|
||||
|
@ -122,7 +122,6 @@ func (mxc *MatrixClient) LoadCommandSpecs() *MatrixClient {
|
||||
for _, spec := range specs {
|
||||
mxc.CommandSpecs[spec.Owner] = spec
|
||||
}
|
||||
log.Debugln("Loaded command specs:", mxc.CommandSpecs)
|
||||
return mxc
|
||||
}
|
||||
|
||||
|
@ -82,7 +82,6 @@ func (css *CommandSpecStatic) getAllByQuery(query string, args ...interface{}) (
|
||||
for rows.Next() {
|
||||
specs = append(specs, css.New().Scan(rows))
|
||||
}
|
||||
log.Debugln("getAllByQuery() =", specs)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -5,8 +5,8 @@ database:
|
||||
logging:
|
||||
directory: ./logs
|
||||
file_mode: 0600
|
||||
print_debug: false
|
||||
file_name_format: "%[1]s-%02[2]d.log"
|
||||
print_level: DEBUG
|
||||
file_name_format: "{{.Date}}-{{.Index}}.log"
|
||||
file_date_format: 2006-01-02
|
||||
timestamp_format: Jan _2, 2006 15:04:05
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user