Skip to content

Releases: saucelabs/sypl

v1.5.12

21 Apr 19:21
a4026fd
Compare
Choose a tag to compare
  • Add redirect standard log functions

v1.5.11

26 Feb 01:11
d487ddc
Compare
Choose a tag to compare
  • Fix missing field in copy fields to child logger.

v1.5.10

22 Feb 18:13
369ba57
Compare
Choose a tag to compare

Changed

  • Fixed New, was missing setting defaultIoWriterLevel, fields, status.
  • Changed default io.Writer level to None.

v1.5.9

22 Feb 08:30
e0cad08
Compare
Choose a tag to compare

Added

  • For convenience, conforms with io.Writer interface. Default level: error. SetIoWriterLevel changes the default level.

Changed

  • Fixed chained example.
  • Lowercased all levels.
  • It now warns when an application tries to write to a closed writer.

v1.5.8

08 Nov 21:21
62f2adc
Compare
Choose a tag to compare
  • All SetXYZ methods returns its proper interface allowing method chaining.
  • Breakpoint is now variadic.
  • Properly handle cases where sypl writes to a piped output, but it's broken.

v1.5.7

02 Nov 22:27
e4ecc72
Compare
Choose a tag to compare
  • Fixed ExampleNew_globalFields test.

v1.5.6

02 Nov 21:10
c2350da
Compare
Choose a tag to compare

Added the ability to set breakpoints. If a Breakpoint is set it'll stop execution waiting the user press /n ("enter") to continue. It helps users doing quick, and effective log-to-console debug. A message with the breakpoint name, and PID of the process will be printed using the debug level. Arbitrary data can optionally be set - if set, it'll be printed. Errors are printed using the standard error level. Set logging level to trace for more.

Previously, flow would look like:

  • Log markers are set, e.g.: logger.Debugln("Here 1", whatever)
  • Application runs
  • Scan visually output, or a file - via grep for the markers.

Now:

  • Named Breakpoints are set
  • Application runs
  • Breakpoint is hit. Information about it is printed.
  • Runtime is paused, allowing analysis of data - if any, right way. Additionally, an external and more advanced debugger can be attached.
  • Dev controls the flow, pressing enter at any time, continue.

v1.5.5

29 Oct 17:31
f2e134e
Compare
Choose a tag to compare

v1.5.4

14 Oct 02:15
67b6734
Compare
Choose a tag to compare
  • Renamed logging component filtering env var from SYPL_DEBUG to SYPL_FILTER.

In a application with many loggers, and child loggers, sometimes more fine control is needed, specially when debugging applications. Sypl offers two powerful ways to achieve that: SYPL_FILTER, and SYPL_DEBUG env vars.

SYPL_FILTER allows to specify the name(s) of the component(s) that should be logged, for example, for a given application with the following loggers: svc, pv, and cm, if a developer wants only to see svc, and pv logging, it's achieved just setting SYPL_FILTER="svc,pv".

SYPL_DEBUG allows to specify the max level, for example, for a given application with the following loggers: svc, pv, and cm, if a developer sets:

  • SYPL_DEBUG="debug": any application running using Sypl, any component, any output, will log messages bellow the debug level
  • SYPL_DEBUG="console:debug": any application running using Sypl with an output called console, will log messages bellow the debug level
  • SYPL_DEBUG="warn,console:debug": any application running using Sypl, any component, any output, will log messages bellow the warn level, AND any application running using Sypl with an output called console, will log messages bellow the debug level.

NOTE: warn is specified first. Only for this case - global scope, it's a requirement.
SYPL_DEBUG="console:debug,warn": In this case warn will be discarded!.

  • SYPL_DEBUG="svc:console:debug": any application running using Sypl with a component called svc with an output called console, will log messages bellow the debug level
  • SYPL_DEBUG="file:warn,svc:console:debug": any application running using Sypl with an output called file will log messages bellow the warn level, and any application running using Sypl with a component called svc with an output called console will log messages bellow the debug.

Possible scopes:

  • {componentName:outputName:level}: Component, and output scoped
  • {outputName:level}: Output scoped
  • {level}: Global scope

The possibilities are endless! Checkout the debugAndFilter example for more.

v1.5.3

21 Sep 23:31
8c13600
Compare
Choose a tag to compare
  • Fix bug where setting fields for a message would set globally too.