some logger
This commit is contained in:
2
.gitmodules
vendored
2
.gitmodules
vendored
@@ -1,3 +1,3 @@
|
||||
[submodule "laniakea"]
|
||||
path = laniakea
|
||||
url = https://git.nix13.pw/ScuroNeko/Laniakea
|
||||
url = git@nix13.pw:ScuroNeko/Laniakea
|
||||
@@ -19,7 +19,6 @@ func getDSN() string {
|
||||
if !exists {
|
||||
host = "localhost"
|
||||
}
|
||||
log.Println("user:", user, "database:", database)
|
||||
return fmt.Sprintf("postgresql://%s:%s@%s/%s?sslmode=disable", user, password, host, database)
|
||||
}
|
||||
|
||||
|
||||
2
laniakea
2
laniakea
Submodule laniakea updated: 13eb3d45de...3d1263b3e0
18
main.go
18
main.go
@@ -2,7 +2,6 @@ package main
|
||||
|
||||
import (
|
||||
"kurumibot/database"
|
||||
"kurumibot/database/psql"
|
||||
"kurumibot/laniakea"
|
||||
"kurumibot/plugins"
|
||||
"log"
|
||||
@@ -19,10 +18,10 @@ func main() {
|
||||
database.ConnectPostgres()
|
||||
database.ConnectMongo()
|
||||
database.ConnectRedis()
|
||||
err = psql.Migrate()
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
//err = psql.Migrate()
|
||||
//if err != nil {
|
||||
// log.Fatalln(err)
|
||||
//}
|
||||
|
||||
bot := laniakea.NewBot(laniakea.LoadSettingsFromEnv())
|
||||
dbCtx := &laniakea.DatabaseContext{
|
||||
@@ -40,6 +39,15 @@ func main() {
|
||||
plugins.RegisterWaifus(bot)
|
||||
plugins.RegisterAdmin(bot)
|
||||
|
||||
//ctx := context.Background()
|
||||
//go func() {
|
||||
// select {
|
||||
// case <-ctx.Done():
|
||||
// {
|
||||
// log.Println("done")
|
||||
// }
|
||||
// }
|
||||
//}()
|
||||
defer bot.Close()
|
||||
bot.Run()
|
||||
}
|
||||
|
||||
101
main.log
101
main.log
@@ -1,56 +1,45 @@
|
||||
[LOG] [INFO] [28.08.2025 12:27:21] Bot running. Press CTRL+C to exit.
|
||||
[LOG] [INFO] [28.08.2025 12:28:31] Bot running. Press CTRL+C to exit.
|
||||
[LOG] [INFO] [28.08.2025 12:29:48] Bot running. Press CTRL+C to exit.
|
||||
[LOG] [INFO] [28.08.2025 12:32:17] Bot running. Press CTRL+C to exit.
|
||||
[LOG] [ERROR] [28.08.2025 12:32:28] [400] Bad Request: can't parse entities: Can't find end of the entity starting at byte offset 1636
|
||||
[LOG] [INFO] [28.08.2025 12:33:01] Bot running. Press CTRL+C to exit.
|
||||
[LOG] [INFO] [28.08.2025 12:35:39] Bot running. Press CTRL+C to exit.
|
||||
[LOG] [INFO] [28.08.2025 12:36:38] Bot running. Press CTRL+C to exit.
|
||||
[LOG] [INFO] [28.08.2025 12:37:08] Bot running. Press CTRL+C to exit.
|
||||
[LOG] [ERROR] [28.08.2025 12:37:12] [400] Bad Request: can't parse entities: Can't find end of the entity starting at byte offset 1578
|
||||
[LOG] [INFO] [28.08.2025 12:37:26] Bot running. Press CTRL+C to exit.
|
||||
[LOG] [DEBUG] [29.09.2025 09:05:07] middleware with name "LogMiddleware" was registered
|
||||
[LOG] [DEBUG] [29.09.2025 09:05:07] plugins with name "Economy" was registered
|
||||
[LOG] [DEBUG] [29.09.2025 09:05:07] plugins with name "Waifus" was registered
|
||||
[LOG] [DEBUG] [29.09.2025 09:05:07] plugins with name "Admin" was registered
|
||||
[LOG] [INFO] [29.09.2025 09:05:07] Bot running. Press CTRL+C to exit.
|
||||
[LOG] [DEBUG] [29.09.2025 09:11:32] middleware with name "LogMiddleware" was registered
|
||||
[LOG] [DEBUG] [29.09.2025 09:11:32] plugins with name "Economy" was registered
|
||||
[LOG] [DEBUG] [29.09.2025 09:11:32] plugins with name "Waifus" was registered
|
||||
[LOG] [DEBUG] [29.09.2025 09:11:32] plugins with name "Admin" was registered
|
||||
[LOG] [INFO] [29.09.2025 09:11:32] Bot running. Press CTRL+C to exit.
|
||||
[LOG] [DEBUG] [29.09.2025 09:13:53] middleware with name "LogMiddleware" was registered
|
||||
[LOG] [DEBUG] [29.09.2025 09:13:53] plugins with name "Economy" was registered
|
||||
[LOG] [DEBUG] [29.09.2025 09:13:53] plugins with name "Waifus" was registered
|
||||
[LOG] [DEBUG] [29.09.2025 09:13:53] plugins with name "Admin" was registered
|
||||
[LOG] [INFO] [29.09.2025 09:13:53] Bot running. Press CTRL+C to exit.
|
||||
[LOG] [DEBUG] [29.09.2025 10:41:45] middleware with name "LogMiddleware" was registered
|
||||
[LOG] [DEBUG] [29.09.2025 10:41:45] plugins with name "Economy" was registered
|
||||
[LOG] [DEBUG] [29.09.2025 10:41:45] plugins with name "Waifus" was registered
|
||||
[LOG] [DEBUG] [29.09.2025 10:41:45] plugins with name "Admin" was registered
|
||||
[LOG] [INFO] [29.09.2025 10:41:45] Bot running. Press CTRL+C to exit.
|
||||
[LOG] [DEBUG] [29.09.2025 10:42:50] middleware with name "LogMiddleware" was registered
|
||||
[LOG] [DEBUG] [29.09.2025 10:42:50] plugins with name "Economy" was registered
|
||||
[LOG] [DEBUG] [29.09.2025 10:42:50] plugins with name "Waifus" was registered
|
||||
[LOG] [DEBUG] [29.09.2025 10:42:50] plugins with name "Admin" was registered
|
||||
[LOG] [INFO] [29.09.2025 10:42:50] Bot running. Press CTRL+C to exit.
|
||||
[LOG] [DEBUG] [bot.go:AddMiddleware:182] [29.09.2025 10:43:38] middleware with name "LogMiddleware" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:165] [29.09.2025 10:43:38] plugins with name "Economy" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:165] [29.09.2025 10:43:38] plugins with name "Waifus" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:165] [29.09.2025 10:43:38] plugins with name "Admin" was registered
|
||||
[LOG] [INFO] [bot.go:Run:198] [29.09.2025 10:43:38] Bot running. Press CTRL+C to exit.
|
||||
[LOG] [DEBUG] [bot.go:AddMiddleware:182] [29.09.2025 10:44:00] middleware with name "LogMiddleware" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:165] [29.09.2025 10:44:00] plugins with name "Economy" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:165] [29.09.2025 10:44:00] plugins with name "Waifus" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:165] [29.09.2025 10:44:00] plugins with name "Admin" was registered
|
||||
[LOG] [INFO] [bot.go:Run:198] [29.09.2025 10:44:00] Bot running. Press CTRL+C to exit.
|
||||
[LOG] [DEBUG] [bot.go:AddMiddleware:182] [29.09.2025 10:51:46] middleware with name "LogMiddleware" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:165] [29.09.2025 10:51:46] plugins with name "Economy" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:165] [29.09.2025 10:51:46] plugins with name "Waifus" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:165] [29.09.2025 10:51:46] plugins with name "Admin" was registered
|
||||
[LOG] [INFO] [bot.go:Run:198] [29.09.2025 10:51:46] Bot running. Press CTRL+C to exit.
|
||||
[LOG] [DEBUG] [bot.go:AddMiddleware:186] [29.09.2025 10:52:42] middleware with name "LogMiddleware" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:169] [29.09.2025 10:52:42] plugins with name "Economy" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:169] [29.09.2025 10:52:42] plugins with name "Waifus" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:169] [29.09.2025 10:52:42] plugins with name "Admin" was registered
|
||||
[LOG] [INFO] [bot.go:Run:202] [29.09.2025 10:52:42] Bot running. Press CTRL+C to exit.
|
||||
[LOG] [DEBUG] [bot.go:AddMiddleware:186] [29.09.2025 16:14:59] middleware with name "LogMiddleware" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:169] [29.09.2025 16:14:59] plugins with name "Economy" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:169] [29.09.2025 16:14:59] plugins with name "Waifus" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:169] [29.09.2025 16:14:59] plugins with name "Admin" was registered
|
||||
[LOG] [INFO] [bot.go:Run:202] [29.09.2025 16:14:59] Bot running. Press CTRL+C to exit.
|
||||
[LOG] [DEBUG] [bot.go:AddMiddleware:186] [29.09.2025 16:15:19] middleware with name "LogMiddleware" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:169] [29.09.2025 16:15:19] plugins with name "Economy" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:169] [29.09.2025 16:15:19] plugins with name "Waifus" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:169] [29.09.2025 16:15:19] plugins with name "Admin" was registered
|
||||
[LOG] [INFO] [bot.go:Run:202] [29.09.2025 16:15:19] Bot running. Press CTRL+C to exit.
|
||||
[LOG] [DEBUG] [bot.go:AddMiddleware:186] [29.09.2025 16:15:42] middleware with name "LogMiddleware" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:169] [29.09.2025 16:15:42] plugins with name "Economy" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:169] [29.09.2025 16:15:42] plugins with name "Waifus" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:169] [29.09.2025 16:15:42] plugins with name "Admin" was registered
|
||||
[LOG] [INFO] [bot.go:Run:202] [29.09.2025 16:15:42] Bot running. Press CTRL+C to exit.
|
||||
[LOG] [DEBUG] [bot.go:AddMiddleware:186] [29.09.2025 16:32:27] middleware with name "LogMiddleware" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:169] [29.09.2025 16:32:27] plugins with name "Economy" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:169] [29.09.2025 16:32:27] plugins with name "Waifus" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:169] [29.09.2025 16:32:27] plugins with name "Admin" was registered
|
||||
[LOG] [INFO] [bot.go:Run:202] [29.09.2025 16:32:27] Bot running. Press CTRL+C to exit.
|
||||
[LOG] [DEBUG] [bot.go:AddMiddleware:186] [29.09.2025 16:33:22] middleware with name "LogMiddleware" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:169] [29.09.2025 16:33:22] plugins with name "Economy" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:169] [29.09.2025 16:33:22] plugins with name "Waifus" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:169] [29.09.2025 16:33:22] plugins with name "Admin" was registered
|
||||
[LOG] [INFO] [bot.go:Run:202] [29.09.2025 16:33:22] Bot running. Press CTRL+C to exit.
|
||||
[LOG] [DEBUG] [bot.go:AddMiddleware:186] [29.09.2025 16:34:27] middleware with name "LogMiddleware" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:169] [29.09.2025 16:34:27] plugins with name "Economy" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:169] [29.09.2025 16:34:27] plugins with name "Waifus" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:169] [29.09.2025 16:34:27] plugins with name "Admin" was registered
|
||||
[LOG] [INFO] [bot.go:Run:202] [29.09.2025 16:34:27] Bot running. Press CTRL+C to exit.
|
||||
[LOG] [DEBUG] [bot.go:AddMiddleware:186] [29.09.2025 16:36:10] middleware with name "LogMiddleware" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:169] [29.09.2025 16:36:10] plugins with name "Economy" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:169] [29.09.2025 16:36:10] plugins with name "Waifus" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:169] [29.09.2025 16:36:10] plugins with name "Admin" was registered
|
||||
[LOG] [INFO] [bot.go:Run:202] [29.09.2025 16:36:10] Bot running. Press CTRL+C to exit.
|
||||
[LOG] [DEBUG] [bot.go:AddMiddleware:186] [29.09.2025 16:37:28] middleware with name "LogMiddleware" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:169] [29.09.2025 16:37:28] plugins with name "Economy" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:169] [29.09.2025 16:37:28] plugins with name "Waifus" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:169] [29.09.2025 16:37:28] plugins with name "Admin" was registered
|
||||
[LOG] [INFO] [bot.go:Run:202] [29.09.2025 16:37:28] Bot running. Press CTRL+C to exit.
|
||||
[LOG] [DEBUG] [bot.go:AddMiddleware:186] [29.09.2025 16:38:43] middleware with name "LogMiddleware" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:169] [29.09.2025 16:38:43] plugins with name "Economy" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:169] [29.09.2025 16:38:43] plugins with name "Waifus" was registered
|
||||
[LOG] [DEBUG] [bot.go:AddPlugins:169] [29.09.2025 16:38:43] plugins with name "Admin" was registered
|
||||
[LOG] [INFO] [bot.go:Run:202] [29.09.2025 16:38:43] Bot running. Press CTRL+C to exit.
|
||||
|
||||
19
requests.log
19
requests.log
@@ -54,3 +54,22 @@
|
||||
[REQUESTS] [DEBUG] [29.09.2025 10:52:16] POST https://api.telegram.org/bot<TOKEN>/getUpdates {"allowed_updates":[],"offset":0,"timeout":30}
|
||||
[REQUESTS] [DEBUG] [29.09.2025 10:52:42] POST https://api.telegram.org/bot<TOKEN>/getUpdates {"allowed_updates":[],"offset":0,"timeout":30}
|
||||
[REQUESTS] [DEBUG] [29.09.2025 10:53:13] POST https://api.telegram.org/bot<TOKEN>/getUpdates {"allowed_updates":[],"offset":0,"timeout":30}
|
||||
[REQUESTS] [DEBUG] [29.09.2025 16:14:59] POST https://api.telegram.org/bot<TOKEN>/getUpdates {"allowed_updates":[],"offset":0,"timeout":30}
|
||||
[REQUESTS] [DEBUG] [29.09.2025 16:15:19] POST https://api.telegram.org/bot<TOKEN>/getUpdates {"allowed_updates":[],"offset":0,"timeout":30}
|
||||
[REQUESTS] [DEBUG] [29.09.2025 16:15:42] POST https://api.telegram.org/bot<TOKEN>/getUpdates {"allowed_updates":[],"offset":0,"timeout":30}
|
||||
[REQUESTS] [DEBUG] [29.09.2025 16:32:27] POST https://api.telegram.org/bot<TOKEN>/getUpdates {"allowed_updates":[],"offset":0,"timeout":30}
|
||||
[REQUESTS] [DEBUG] [29.09.2025 16:32:58] POST https://api.telegram.org/bot<TOKEN>/getUpdates {"allowed_updates":[],"offset":0,"timeout":30}
|
||||
[REQUESTS] [DEBUG] [29.09.2025 16:33:22] POST https://api.telegram.org/bot<TOKEN>/getUpdates {"allowed_updates":[],"offset":0,"timeout":30}
|
||||
[REQUESTS] [DEBUG] [29.09.2025 16:33:52] POST https://api.telegram.org/bot<TOKEN>/getUpdates {"allowed_updates":[],"offset":0,"timeout":30}
|
||||
[REQUESTS] [DEBUG] [29.09.2025 16:34:22] POST https://api.telegram.org/bot<TOKEN>/getUpdates {"allowed_updates":[],"offset":0,"timeout":30}
|
||||
[REQUESTS] [DEBUG] [29.09.2025 16:34:27] POST https://api.telegram.org/bot<TOKEN>/getUpdates {"allowed_updates":[],"offset":0,"timeout":30}
|
||||
[REQUESTS] [DEBUG] [29.09.2025 16:34:58] POST https://api.telegram.org/bot<TOKEN>/getUpdates {"allowed_updates":[],"offset":0,"timeout":30}
|
||||
[REQUESTS] [DEBUG] [29.09.2025 16:35:28] POST https://api.telegram.org/bot<TOKEN>/getUpdates {"allowed_updates":[],"offset":0,"timeout":30}
|
||||
[REQUESTS] [DEBUG] [29.09.2025 16:35:58] POST https://api.telegram.org/bot<TOKEN>/getUpdates {"allowed_updates":[],"offset":0,"timeout":30}
|
||||
[REQUESTS] [DEBUG] [29.09.2025 16:36:10] POST https://api.telegram.org/bot<TOKEN>/getUpdates {"allowed_updates":[],"offset":0,"timeout":30}
|
||||
[REQUESTS] [DEBUG] [29.09.2025 16:36:41] POST https://api.telegram.org/bot<TOKEN>/getUpdates {"allowed_updates":[],"offset":0,"timeout":30}
|
||||
[REQUESTS] [DEBUG] [29.09.2025 16:37:11] POST https://api.telegram.org/bot<TOKEN>/getUpdates {"allowed_updates":[],"offset":0,"timeout":30}
|
||||
[REQUESTS] [DEBUG] [29.09.2025 16:37:28] POST https://api.telegram.org/bot<TOKEN>/getUpdates {"allowed_updates":[],"offset":0,"timeout":30}
|
||||
[REQUESTS] [DEBUG] [29.09.2025 16:37:59] POST https://api.telegram.org/bot<TOKEN>/getUpdates {"allowed_updates":[],"offset":0,"timeout":30}
|
||||
[REQUESTS] [DEBUG] [29.09.2025 16:38:43] POST https://api.telegram.org/bot<TOKEN>/getUpdates {"allowed_updates":[],"offset":0,"timeout":30}
|
||||
[REQUESTS] [DEBUG] [29.09.2025 16:39:14] POST https://api.telegram.org/bot<TOKEN>/getUpdates {"allowed_updates":[],"offset":0,"timeout":30}
|
||||
|
||||
Reference in New Issue
Block a user