Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 614 Bytes

logging.md

File metadata and controls

18 lines (12 loc) · 614 Bytes

Logging

In Astra we use ZeroLog for logging, which is a fast and lightweight logging library. By default we have info level logging configured, but to specify debug, you can add a configuration option to the New function

gen := astra.New(...(your options)..., astra.WithLogLevel("debug"))

Custom Logger

If you want to use your own logger, you can do so by using the WithCustomLogger option:

import "github.com/rs/zerolog/log"

logger := log.With().Caller().Logger()
astra.New(...(previous configuration)..., astra.WithCustomLogger(logger))