package
Version:
v0.3.1
Opens a new window with list of versions in this module.
Published: Apr 4, 2026
License: Apache-2.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶

stdlog
import "github.com/go-coldbrew/log/loggers/stdlog"
Package stdlog provides a BaseLogger implementation for golang "log" package
Example
This example shows how to use the stdlog backend. It uses Go's standard "log" package for output — simple but no structured formatting.
package main
import (
"context"
"github.com/go-coldbrew/log"
"github.com/go-coldbrew/log/loggers/stdlog"
)
func main() {
logger := stdlog.NewLogger()
log.SetLogger(log.NewLogger(logger))
ctx := context.Background()
log.Info(ctx, "msg", "server started", "port", 8080)
}
Index
func NewLogger(options ...loggers.Option) loggers.BaseLogger
NewLogger returns a BaseLogger impl for golang "log" package
Generated by gomarkdoc
Documentation
¶
Package stdlog provides a BaseLogger implementation for golang "log" package
This example shows how to use the stdlog backend.
It uses Go's standard "log" package for output — simple but no structured formatting.
package main
import (
"context"
"github.com/go-coldbrew/log"
"github.com/go-coldbrew/log/loggers/stdlog"
)
func main() {
logger := stdlog.NewLogger()
log.SetLogger(log.NewLogger(logger))
ctx := context.Background()
log.Info(ctx, "msg", "server started", "port", 8080)
}
Output:
NewLogger returns a BaseLogger impl for golang "log" package
Source Files
¶
Click to show internal directories.
Click to hide internal directories.