Documentation
¶
Index ¶
- func CtxWithLogger(ctx context.Context, log zerolog.Logger) context.Context
- func Debug(v ...interface{})
- func Debugf(format string, v ...interface{})
- func Error(v ...interface{})
- func Errorf(format string, v ...interface{})
- func Fatal(v ...interface{})
- func Fatalf(format string, v ...interface{})
- func FromContext(ctx context.Context) zerolog.Logger
- func Info(v ...interface{})
- func Infof(format string, v ...interface{})
- func Init()
- func Log(ctx context.Context) log.Logger
- func StripANSI(s string) string
- func Warn(v ...interface{})
- func Warnf(format string, v ...interface{})
- type WorkflowLogFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CtxWithLogger ¶
CtxWithLogger attaches a zerolog.Logger instance to the context.
func FromContext ¶
FromContext retrieves the logger instance from context, or returns the global logger.
Types ¶
type WorkflowLogFile ¶
type WorkflowLogFile struct {
// contains filtered or unexported fields
}
WorkflowLogFile holds the file handle for a workflow's log file.
func InitWorkflowLogger ¶
func InitWorkflowLogger(ctx context.Context, workflowLogsDir string) (context.Context, *WorkflowLogFile, error)
InitWorkflowLogger creates a zerolog.Logger instance that writes to both stdout and <workflowDir>/worker.log. Returns the logger instance and a file handle that must be closed when the workflow finishes. Note: workflowDir must already exist before calling this function.
func (*WorkflowLogFile) Close ¶
func (wf *WorkflowLogFile) Close() error
Close must be called when the workflow finishes.
Click to show internal directories.
Click to hide internal directories.