mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-21 23:22:34 +01:00
refactor: extract gametime package, replace fmt.Printf with zap logging
Move time utilities (TimeAdjusted, TimeMidnight, TimeWeekStart, TimeWeekNext, TimeGameAbsolute) from channelserver into common/gametime to break the inappropriate dependency where signserver, entranceserver, and api imported the 38K-line channelserver package just for time functions. Replace all fmt.Printf debug logging in sys_session.go and handlers_object.go with structured zap logging for consistent observability.
This commit is contained in:
3
main.go
3
main.go
@@ -10,6 +10,7 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"erupe-ce/common/gametime"
|
||||
"erupe-ce/server/api"
|
||||
"erupe-ce/server/channelserver"
|
||||
"erupe-ce/server/discordbot"
|
||||
@@ -142,7 +143,7 @@ func main() {
|
||||
logger.Info("Database: Finished clearing")
|
||||
}
|
||||
|
||||
logger.Info(fmt.Sprintf("Server Time: %s", channelserver.TimeAdjusted().String()))
|
||||
logger.Info(fmt.Sprintf("Server Time: %s", gametime.Adjusted().String()))
|
||||
|
||||
// Now start our server(s).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user