A high-performance, feature-rich logging library for Go with deduplication, audio PCM/WAV logging, graceful shutdown, and comprehensive configuration.
package main
import (
"context"
"github.com/LastBotInc/coralie-logging-go/pkg/clog"
)
func main() {
cfg := clog.DefaultConfig()
cfg.Console.Enabled = true
cfg.File.BaseDir = "./logs"
clog.Init(cfg)
defer clog.Shutdown(context.Background())
clog.Info("Application", "Server starting on port 8080")
clog.Success("Application", "Server started successfully")
clog.Error("Application", "Connection failed: %v", err)
}go get github.com/LastBotInc/coralie-logging-go- Multiple log levels: Debug, Info, Success, Warning, Fail, Error, Catastrophe
- Deduplication: Automatically collapses consecutive identical log lines
- File routing: Write different levels to different files
- Console output: Colorized, TTY-aware console logging
- Audio logging: Write PCM16 audio frames to WAV files
- Graceful shutdown: Drains queue, flushes all sinks, handles signals
- Hooks: Global and per-level hooks for custom processing
- Performance: Bounded queues, drop policies, minimal allocations
See EXAMPLES.md for a complete list of examples.
Run the demo:
go run ./cmd/coralie-logging-demoComprehensive documentation is available in the Documents/ directory:
- INDEX.md - Navigation guide
- ARCHITECTURE.md - System architecture
- CONFIGURATION.md - Configuration options
- LEVELS.md - Log levels explained
- DEDUPE.md - Deduplication behavior
- AUDIO_PCM_WAV.md - Audio logging guide
- SHUTDOWN_PANIC_SIGNALS.md - Shutdown and signal handling
- PERFORMANCE.md - Performance characteristics
- TESTING.md - Testing guide
- CHANGELOG.md - Version history
MIT License - see LICENSE file.