diff --git a/cmd/main/main.go b/cmd/main/main.go index 35626c9..347be07 100644 --- a/cmd/main/main.go +++ b/cmd/main/main.go @@ -3,12 +3,14 @@ package main import ( "caatsm/internal/config" "caatsm/internal/nats" + "caatsm/pkg/utils" "fmt" ) func main() { cfg, err := config.LoadConfig() + log := utils.GetLogger() if err != nil { fmt.Printf("Error loading configuration: %v\n", err) return @@ -21,6 +23,7 @@ func main() { fmt.Println("Loaded configuration successfully") + log.Info("Starting nats subscriber") subscribe := nats.NewNatsHandler(cfg) subscribe.Subscribe() } diff --git a/configs/config.development.toml b/configs/config.development.toml deleted file mode 100644 index 80bcb08..0000000 --- a/configs/config.development.toml +++ /dev/null @@ -1,42 +0,0 @@ -[nats] -url = "nats://localhost:4222" -cluster_id = "test-cluster" -client_id = "test-client" - -[subscription] -topic = "example-topic" -queue_group = "example-group" - -[timeouts] -server_timeout = "30s" -reconnect_wait = "10s" -close_timeout = "10s" -ack_wait_timeout = "5s" - -[[body]] -name = "FPL" -[[body.patterns]] -pattern = "^\\((?P[A-Z]{3})\\-(?P[A-Z]+\\d+)\\-(?P[A-Z]{2})(?:.*\\s*)?\\-(?P[A-Z]+\\d+/?[A-Z]?)\\s*\\-(?P.*)\\s*\\-(?P[A-Z]{4})(?P\\d{4})\\s*\\-(?P[A-Z]+\\d+)(?P[A-Z0-9]+)\\s(?P.*)\\s*\\-(?P[A-Z]{4})(?P\\d{4})\\s(?P[A-Z]{4})\\s*\\-(?PPBN\\/[A-Z0-9]+)\\s(?P