Documentation ¶
Index ¶
- func ContextWithLogger(ctx context.Context) context.Context
- func ExecutionLogger(ctx context.Context, executionID string) *zap.Logger
- type FlowpipeLogger
- func (c *FlowpipeLogger) Debug(msg string, keysAndValues ...interface{})
- func (c *FlowpipeLogger) Error(msg string, keysAndValues ...interface{})
- func (c *FlowpipeLogger) Info(msg string, keysAndValues ...interface{})
- func (c *FlowpipeLogger) Initialize() error
- func (c *FlowpipeLogger) Sync() error
- func (c *FlowpipeLogger) Trace(msg string, keysAndValues ...interface{})
- func (c *FlowpipeLogger) Warn(msg string, keysAndValues ...interface{})
- type LoggerOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FlowpipeLogger ¶
type FlowpipeLogger struct { // Level is the logging level to use for output Level zapcore.Level // Special handling for the "trace" level TraceLevel string // Format is the logging format to use for output: json or console Format string // Color is whether to use color in the console output Color bool // Zap is the Zap logger instance Zap *zap.Logger Sugar *zap.SugaredLogger }
func Logger ¶
func Logger(ctx context.Context) *FlowpipeLogger
func NewLogger ¶
func NewLogger(ctx context.Context, opts ...LoggerOption) (*FlowpipeLogger, error)
NewLogger creates a new Logger.
func (*FlowpipeLogger) Debug ¶
func (c *FlowpipeLogger) Debug(msg string, keysAndValues ...interface{})
func (*FlowpipeLogger) Error ¶
func (c *FlowpipeLogger) Error(msg string, keysAndValues ...interface{})
func (*FlowpipeLogger) Info ¶
func (c *FlowpipeLogger) Info(msg string, keysAndValues ...interface{})
func (*FlowpipeLogger) Initialize ¶
func (c *FlowpipeLogger) Initialize() error
func (*FlowpipeLogger) Sync ¶
func (c *FlowpipeLogger) Sync() error
func (*FlowpipeLogger) Trace ¶
func (c *FlowpipeLogger) Trace(msg string, keysAndValues ...interface{})
func (*FlowpipeLogger) Warn ¶
func (c *FlowpipeLogger) Warn(msg string, keysAndValues ...interface{})
type LoggerOption ¶
type LoggerOption func(*FlowpipeLogger) error
LoggerOption defines a type of function to configures the Logger.
func WithColor ¶
func WithColor(enabled bool) LoggerOption
func WithFormatFromEnvironment ¶
func WithFormatFromEnvironment() LoggerOption
func WithLevelFromEnvironment ¶
func WithLevelFromEnvironment() LoggerOption
Click to show internal directories.
Click to hide internal directories.