Releases: pellared/olog
Releases · pellared/olog
v0.0.4
Immutable
release. Only release title and notes can be modified.
Changed
- BREAKING: Rename
Logger.TraceEvent(ctx context.Context, name string, args ...any)toLogger.Trace(ctx context.Context, eventName string, args ...any). - BREAKING: Rename
Logger.DebugEvent(ctx context.Context, name string, args ...any)toLogger.Debug(ctx context.Context, eventName string, args ...any). - BREAKING: Rename
Logger.InfoEvent(ctx context.Context, name string, args ...any)toLogger.Info(ctx context.Context, eventName string, args ...any). - BREAKING: Rename
Logger.WarnEvent(ctx context.Context, name string, args ...any)toLogger.Warn(ctx context.Context, eventName string, args ...any). - BREAKING: Rename
Logger.ErrorEvent(ctx context.Context, name string, args ...any)toLogger.Error(ctx context.Context, eventName string, args ...any). - BREAKING: Rename
Logger.Event(ctx context.Context, level log.Severity, name string, args ...any)toLogger.Log(ctx context.Context, level log.Severity, eventName string, args ...any). - BREAKING: Rename
Logger.TraceEventAttr(ctx context.Context, name string, attrs ...log.KeyValue)toLogger.TraceAttr(ctx context.Context, eventName string, attrs ...log.KeyValue). - BREAKING: Rename
Logger.DebugEventAttr(ctx context.Context, name string, attrs ...log.KeyValue)toLogger.DebugAttr(ctx context.Context, eventName string, attrs ...log.KeyValue). - BREAKING: Rename
Logger.InfoEventAttr(ctx context.Context, name string, attrs ...log.KeyValue)toLogger.InfoAttr(ctx context.Context, eventName string, attrs ...log.KeyValue). - BREAKING: Rename
Logger.WarnEventAttr(ctx context.Context, name string, attrs ...log.KeyValue)toLogger.WarnAttr(ctx context.Context, eventName string, attrs ...log.KeyValue). - BREAKING: Rename
Logger.ErrorEventAttr(ctx context.Context, name string, attrs ...log.KeyValue)toLogger.ErrorAttr(ctx context.Context, eventName string, attrs ...log.KeyValue). - BREAKING: Rename
Logger.EventAttr(ctx context.Context, level log.Severity, name string, attrs ...log.KeyValue)toLogger.LogAttr(ctx context.Context, level log.Severity, eventName string, attrs ...log.KeyValue). - BREAKING: Rename
Logger.TraceEventEnabled(ctx context.Context, eventName string) booltoLogger.TraceEnabled(ctx context.Context, eventName string) bool. - BREAKING: Rename
Logger.DebugEventEnabled(ctx context.Context, eventName string) booltoLogger.DebugEnabled(ctx context.Context, eventName string) bool. - BREAKING: Rename
Logger.InfoEventEnabled(ctx context.Context, eventName string) booltoLogger.InfoEnabled(ctx context.Context, eventName string) bool. - BREAKING: Rename
Logger.WarnEventEnabled(ctx context.Context, eventName string) booltoLogger.WarnEnabled(ctx context.Context, eventName string) bool. - BREAKING: Rename
Logger.ErrorEventEnabled(ctx context.Context, eventName string) booltoLogger.ErrorEnabled(ctx context.Context, eventName string) bool.
Removed
- BREAKING: Remove
Logger.Trace(ctx context.Context, msg string, args ...any). Use event-based logging withLogger.Trace(ctx context.Context, eventName string, args ...any)instead. - BREAKING: Remove
Logger.TraceAttr(ctx context.Context, msg string, attrs ...log.KeyValue). Use event-based logging withLogger.TraceAttr(ctx context.Context, eventName string, attrs ...log.KeyValue)instead. - BREAKING: Remove
Logger.Debug(ctx context.Context, msg string, args ...any). Use event-based logging withLogger.Debug(ctx context.Context, eventName string, args ...any)instead. - BREAKING: Remove
Logger.DebugAttr(ctx context.Context, msg string, attrs ...log.KeyValue). Use event-based logging withLogger.DebugAttr(ctx context.Context, eventName string, attrs ...log.KeyValue)instead. - BREAKING: Remove
Logger.Info(ctx context.Context, msg string, args ...any). Use event-based logging withLogger.Info(ctx context.Context, eventName string, args ...any)instead. - BREAKING: Remove
Logger.InfoAttr(ctx context.Context, msg string, attrs ...log.KeyValue). Use event-based logging withLogger.InfoAttr(ctx context.Context, eventName string, attrs ...log.KeyValue)instead. - BREAKING: Remove
Logger.Warn(ctx context.Context, msg string, args ...any). Use event-based logging withLogger.Warn(ctx context.Context, eventName string, args ...any)instead. - BREAKING: Remove
Logger.WarnAttr(ctx context.Context, msg string, attrs ...log.KeyValue). Use event-based logging withLogger.WarnAttr(ctx context.Context, eventName string, attrs ...log.KeyValue)instead. - BREAKING: Remove
Logger.Error(ctx context.Context, msg string, args ...any). Use event-based logging withLogger.Error(ctx context.Context, eventName string, args ...any)instead. - BREAKING: Remove
Logger.ErrorAttr(ctx context.Context, msg string, attrs ...log.KeyValue). Use event-based logging withLogger.ErrorAttr(ctx context.Context, eventName string, attrs ...log.KeyValue)instead. - BREAKING: Remove
Logger.Log(ctx context.Context, level log.Severity, msg string, args ...any). Use event-based logging withLogger.Log(ctx context.Context, level log.Severity, eventName string, args ...any)instead. - BREAKING: Remove
Logger.LogAttr(ctx context.Context, level log.Severity, msg string, attrs ...log.KeyValue). Use event-based logging withLogger.LogAttr(ctx context.Context, level log.Severity, eventName string, attrs ...log.KeyValue)instead. - BREAKING: Remove
Logger.TraceEnabled(ctx context.Context) bool. UseLogger.TraceEnabled(ctx context.Context, eventName string) boolinstead. - BREAKING: Remove
Logger.DebugEnabled(ctx context.Context) bool. UseLogger.DebugEnabled(ctx context.Context, eventName string) boolinstead. - BREAKING: Remove
Logger.InfoEnabled(ctx context.Context) bool. UseLogger.InfoEnabled(ctx context.Context, eventName string) boolinstead. - BREAKING: Remove
Logger.WarnEnabled(ctx context.Context) bool. UseLogger.WarnEnabled(ctx context.Context, eventName string) boolinstead. - BREAKING: Remove
Logger.ErrorEnabled(ctx context.Context) bool. UseLogger.ErrorEnabled(ctx context.Context, eventName string) boolinstead.
v0.0.3
Immutable
release. Only release title and notes can be modified.
Added
Logger.TraceEvent(ctx context.Context, name string, args ...any)that logs a trace-level event with the specified name and optional key-value pairs.Logger.DebugEvent(ctx context.Context, name string, args ...any)that logs a debug-level event with the specified name and optional key-value pairs.Logger.InfoEvent(ctx context.Context, name string, args ...any)that logs an info-level event with the specified name and optional key-value pairs.Logger.WarnEvent(ctx context.Context, name string, args ...any)that logs a warn-level event with the specified name and optional key-value pairs.Logger.ErrorEvent(ctx context.Context, name string, args ...any)that logs an error-level event with the specified name and optional key-value pairs.Logger.TraceEventAttr(ctx context.Context, name string, attrs ...log.KeyValue)that logs a trace-level event with the specified name and the provided attributes.Logger.DebugEventAttr(ctx context.Context, name string, attrs ...log.KeyValue)that logs a debug-level event with the specified name and the provided attributes.Logger.InfoEventAttr(ctx context.Context, name string, attrs ...log.KeyValue)that logs an info-level event with the specified name and the provided attributes.Logger.WarnEventAttr(ctx context.Context, name string, attrs ...log.KeyValue)that logs a warn-level event with the specified name and the provided attributes.Logger.ErrorEventAttr(ctx context.Context, name string, attrs ...log.KeyValue)that logs an error-level event with the specified name and the provided attributes.Logger.TraceEventEnabled(ctx context.Context, eventName string) boolthat reports whether the logger emits trace-level event log records for the given event name.Logger.DebugEventEnabled(ctx context.Context, eventName string) boolthat reports whether the logger emits debug-level event log records for the given event name.Logger.InfoEventEnabled(ctx context.Context, eventName string) boolthat reports whether the logger emits info-level event log records for the given event name.Logger.WarnEventEnabled(ctx context.Context, eventName string) boolthat reports whether the logger emits warn-level event log records for the given event name.Logger.ErrorEventEnabled(ctx context.Context, eventName string) boolthat reports whether the logger emits error-level event log records for the given event name.
Changed
- BREAKING:
Logger.Event(ctx context.Context, name string, args ...any)now requires alevel log.Severityparameter:Logger.Event(ctx context.Context, level log.Severity, name string, args ...any). - BREAKING:
Logger.EventAttr(ctx context.Context, name string, attrs ...log.KeyValue)now requires alevel log.Severityparameter:Logger.EventAttr(ctx context.Context, level log.Severity, name string, attrs ...log.KeyValue).
v0.0.2
v0.0.1
Immutable
release. Only release title and notes can be modified.
Added
New(options Options) *Loggerthat creates a new Logger with the provided options.Loggertype that provides an ergonomic frontend API for OpenTelemetry structured logging with embeddedlog.Logger.Optionstype that contains configuration options for creating a Logger.Logger.Trace(ctx context.Context, msg string, args ...any)that logs a trace message with optional key-value pairs.Logger.TraceAttr(ctx context.Context, msg string, attrs ...log.KeyValue)that logs a trace message with the provided attributes.Logger.TraceEnabled(ctx context.Context) boolthat reports whether the logger emits trace-level log records.Logger.Debug(ctx context.Context, msg string, args ...any)that logs a debug message with optional key-value pairs.Logger.DebugAttr(ctx context.Context, msg string, attrs ...log.KeyValue)that logs a debug message with the provided attributes.Logger.DebugEnabled(ctx context.Context) boolthat reports whether the logger emits debug-level log records.Logger.Info(ctx context.Context, msg string, args ...any)that logs an info message with optional key-value pairs.Logger.InfoAttr(ctx context.Context, msg string, attrs ...log.KeyValue)that logs an info message with the provided attributes.Logger.InfoEnabled(ctx context.Context) boolthat reports whether the logger emits info-level log records.Logger.Warn(ctx context.Context, msg string, args ...any)that logs a warning message with optional key-value pairs.Logger.WarnAttr(ctx context.Context, msg string, attrs ...log.KeyValue)that logs a warning message with the provided attributes.Logger.WarnEnabled(ctx context.Context) boolthat reports whether the logger emits warn-level log records.Logger.Error(ctx context.Context, msg string, args ...any)that logs an error message with optional key-value pairs.Logger.ErrorAttr(ctx context.Context, msg string, attrs ...log.KeyValue)that logs an error message with the provided attributes.Logger.ErrorEnabled(ctx context.Context) boolthat reports whether the logger emits error-level log records.Logger.Log(ctx context.Context, level log.Severity, msg string, args ...any)that logs a message at the specified level with optional key-value pairs.Logger.LogAttr(ctx context.Context, level log.Severity, msg string, attrs ...log.KeyValue)that logs a message at the specified level with the provided attributes.Logger.Event(ctx context.Context, name string, args ...any)that logs an event with the specified name and optional key-value pairs.Logger.EventAttr(ctx context.Context, name string, attrs ...log.KeyValue)that logs an event with the specified name and the provided attributes.Logger.With(args ...any) *Loggerthat returns a new Logger that includes the given attributes in all log records.Logger.WithAttr(attrs ...log.KeyValue) *Loggerthat returns a new Logger that includes the given attributes in all log records.