Skip to content

Releases: pellared/olog

v0.0.4

09 Dec 22:07
Immutable release. Only release title and notes can be modified.
v0.0.4
fadd83c

Choose a tag to compare

v0.0.4 Pre-release
Pre-release

Changed

  • BREAKING: Rename Logger.TraceEvent(ctx context.Context, name string, args ...any) to Logger.Trace(ctx context.Context, eventName string, args ...any).
  • BREAKING: Rename Logger.DebugEvent(ctx context.Context, name string, args ...any) to Logger.Debug(ctx context.Context, eventName string, args ...any).
  • BREAKING: Rename Logger.InfoEvent(ctx context.Context, name string, args ...any) to Logger.Info(ctx context.Context, eventName string, args ...any).
  • BREAKING: Rename Logger.WarnEvent(ctx context.Context, name string, args ...any) to Logger.Warn(ctx context.Context, eventName string, args ...any).
  • BREAKING: Rename Logger.ErrorEvent(ctx context.Context, name string, args ...any) to Logger.Error(ctx context.Context, eventName string, args ...any).
  • BREAKING: Rename Logger.Event(ctx context.Context, level log.Severity, name string, args ...any) to Logger.Log(ctx context.Context, level log.Severity, eventName string, args ...any).
  • BREAKING: Rename Logger.TraceEventAttr(ctx context.Context, name string, attrs ...log.KeyValue) to Logger.TraceAttr(ctx context.Context, eventName string, attrs ...log.KeyValue).
  • BREAKING: Rename Logger.DebugEventAttr(ctx context.Context, name string, attrs ...log.KeyValue) to Logger.DebugAttr(ctx context.Context, eventName string, attrs ...log.KeyValue).
  • BREAKING: Rename Logger.InfoEventAttr(ctx context.Context, name string, attrs ...log.KeyValue) to Logger.InfoAttr(ctx context.Context, eventName string, attrs ...log.KeyValue).
  • BREAKING: Rename Logger.WarnEventAttr(ctx context.Context, name string, attrs ...log.KeyValue) to Logger.WarnAttr(ctx context.Context, eventName string, attrs ...log.KeyValue).
  • BREAKING: Rename Logger.ErrorEventAttr(ctx context.Context, name string, attrs ...log.KeyValue) to Logger.ErrorAttr(ctx context.Context, eventName string, attrs ...log.KeyValue).
  • BREAKING: Rename Logger.EventAttr(ctx context.Context, level log.Severity, name string, attrs ...log.KeyValue) to Logger.LogAttr(ctx context.Context, level log.Severity, eventName string, attrs ...log.KeyValue).
  • BREAKING: Rename Logger.TraceEventEnabled(ctx context.Context, eventName string) bool to Logger.TraceEnabled(ctx context.Context, eventName string) bool.
  • BREAKING: Rename Logger.DebugEventEnabled(ctx context.Context, eventName string) bool to Logger.DebugEnabled(ctx context.Context, eventName string) bool.
  • BREAKING: Rename Logger.InfoEventEnabled(ctx context.Context, eventName string) bool to Logger.InfoEnabled(ctx context.Context, eventName string) bool.
  • BREAKING: Rename Logger.WarnEventEnabled(ctx context.Context, eventName string) bool to Logger.WarnEnabled(ctx context.Context, eventName string) bool.
  • BREAKING: Rename Logger.ErrorEventEnabled(ctx context.Context, eventName string) bool to Logger.ErrorEnabled(ctx context.Context, eventName string) bool.

Removed

  • BREAKING: Remove Logger.Trace(ctx context.Context, msg string, args ...any). Use event-based logging with Logger.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 with Logger.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 with Logger.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 with Logger.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 with Logger.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 with Logger.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 with Logger.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 with Logger.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 with Logger.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 with Logger.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 with Logger.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 with Logger.LogAttr(ctx context.Context, level log.Severity, eventName string, attrs ...log.KeyValue) instead.
  • BREAKING: Remove Logger.TraceEnabled(ctx context.Context) bool. Use Logger.TraceEnabled(ctx context.Context, eventName string) bool instead.
  • BREAKING: Remove Logger.DebugEnabled(ctx context.Context) bool. Use Logger.DebugEnabled(ctx context.Context, eventName string) bool instead.
  • BREAKING: Remove Logger.InfoEnabled(ctx context.Context) bool. Use Logger.InfoEnabled(ctx context.Context, eventName string) bool instead.
  • BREAKING: Remove Logger.WarnEnabled(ctx context.Context) bool. Use Logger.WarnEnabled(ctx context.Context, eventName string) bool instead.
  • BREAKING: Remove Logger.ErrorEnabled(ctx context.Context) bool. Use Logger.ErrorEnabled(ctx context.Context, eventName string) bool instead.

v0.0.3

30 Sep 17:49
Immutable release. Only release title and notes can be modified.
v0.0.3
46d186c

Choose a tag to compare

v0.0.3 Pre-release
Pre-release

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) bool that reports whether the logger emits trace-level event log records for the given event name.
  • Logger.DebugEventEnabled(ctx context.Context, eventName string) bool that reports whether the logger emits debug-level event log records for the given event name.
  • Logger.InfoEventEnabled(ctx context.Context, eventName string) bool that reports whether the logger emits info-level event log records for the given event name.
  • Logger.WarnEventEnabled(ctx context.Context, eventName string) bool that reports whether the logger emits warn-level event log records for the given event name.
  • Logger.ErrorEventEnabled(ctx context.Context, eventName string) bool that 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 a level log.Severity parameter: 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 a level log.Severity parameter: Logger.EventAttr(ctx context.Context, level log.Severity, name string, attrs ...log.KeyValue).

v0.0.2

26 Sep 16:39
Immutable release. Only release title and notes can be modified.
v0.0.2
4096094

Choose a tag to compare

v0.0.2 Pre-release
Pre-release

Changed

  • Minimum required Go version is now Go 1.24 instead of Go 1.25.1.

v0.0.1

26 Sep 13:23
Immutable release. Only release title and notes can be modified.
v0.0.1
14ff247

Choose a tag to compare

v0.0.1 Pre-release
Pre-release

Added

  • New(options Options) *Logger that creates a new Logger with the provided options.
  • Logger type that provides an ergonomic frontend API for OpenTelemetry structured logging with embedded log.Logger.
  • Options type 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) bool that 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) bool that 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) bool that 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) bool that 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) bool that 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) *Logger that returns a new Logger that includes the given attributes in all log records.
  • Logger.WithAttr(attrs ...log.KeyValue) *Logger that returns a new Logger that includes the given attributes in all log records.