Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different default logger file for osctrl-admin #561

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions admin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const (
// Default redis configuration file
defRedisConfigurationFile string = "config/redis.json"
// Default Logger configuration file
defLoggerConfigurationFile string = "config/logger.json"
defLoggerConfigurationFile string = "config/logger_admin.json"
// Default TLS certificate file
defTLSCertificateFile string = "config/tls.crt"
// Default TLS private key file
Expand Down Expand Up @@ -736,6 +736,7 @@ func osctrlAdminService() {

// FIXME Redis cache - Ticker to cleanup sessions
// FIXME splay this?
log.Info().Msg("Initialize cleanup sessions")
go func() {
_t := settingsmgr.CleanupSessions()
if _t == 0 {
Expand All @@ -751,6 +752,7 @@ func osctrlAdminService() {
}()

// Goroutine to cleanup expired queries and carves
log.Info().Msg("Initialize cleanup queries/carves")
go func() {
_t := settingsmgr.CleanupExpired()
if _t == 0 {
Expand Down Expand Up @@ -786,6 +788,7 @@ func osctrlAdminService() {
}

// Initialize Admin handlers before router
log.Info().Msg("Initializing handlers")
handlersAdmin = handlers.CreateHandlersAdmin(
handlers.WithDB(db.Conn),
handlers.WithEnvs(envs),
Expand All @@ -809,9 +812,7 @@ func osctrlAdminService() {
)

// ////////////////////////// ADMIN
if settingsmgr.DebugService(settings.ServiceAdmin) {
log.Debug().Msg("DebugService: Creating router")
}
log.Info().Msg("Initializing router")
// Create router for admin
adminMux := http.NewServeMux()

Expand Down
Loading