summaryrefslogtreecommitdiffhomepage
path: root/internal/logging/manager.go
diff options
context:
space:
mode:
authoradamdottv <[email protected]>2025-05-12 08:43:34 -0500
committeradamdottv <[email protected]>2025-05-12 08:43:34 -0500
commited9fba99c9e230094ed5d468c88f81469d60c911 (patch)
tree0cebc5f7610e91c58c0289d3aa12d1f4c57eab8e /internal/logging/manager.go
parentf1007771997bd0401516eda87a7e0ac92f269680 (diff)
downloadopencode-ed9fba99c9e230094ed5d468c88f81469d60c911.tar.gz
opencode-ed9fba99c9e230094ed5d468c88f81469d60c911.zip
wip: refactoring
Diffstat (limited to 'internal/logging/manager.go')
-rw-r--r--internal/logging/manager.go48
1 files changed, 0 insertions, 48 deletions
diff --git a/internal/logging/manager.go b/internal/logging/manager.go
deleted file mode 100644
index e8e96520b..000000000
--- a/internal/logging/manager.go
+++ /dev/null
@@ -1,48 +0,0 @@
-package logging
-
-import (
- "context"
- "sync"
-)
-
-// Manager handles logging management
-type Manager struct {
- service Service
- mu sync.RWMutex
-}
-
-// Global instance of the logging manager
-var globalManager *Manager
-
-// InitManager initializes the global logging manager with the provided service
-func InitManager(service Service) {
- globalManager = &Manager{
- service: service,
- }
-
- // Subscribe to log events if needed
- go func() {
- ctx := context.Background()
- _ = service.Subscribe(ctx) // Just subscribing to keep the channel open
- }()
-}
-
-// GetService returns the logging service
-func GetService() Service {
- if globalManager == nil {
- return nil
- }
-
- globalManager.mu.RLock()
- defer globalManager.mu.RUnlock()
-
- return globalManager.service
-}
-
-func Create(ctx context.Context, log Log) error {
- if globalManager == nil {
- return nil
- }
- return globalManager.service.Create(ctx, log)
-}
-