Changes for version 0.42 - 2026-12-03

  • Incompatibilities
    • A CODE or object logger that dies no longer stops the program: the failure is reported like a syslog failure, and the other backends still get the message. A logger without a method for the level still croaks.
    • A bad setlogsock() option in the syslog hash, which used to croak at the first message, is now reported as a syslog failure.
    • A syslog failure is no longer carped when another backend takes the report of it.
    • While a message is delivered, a program's __DIE__ handler is set aside: it is not called for errors that are trapped, nor for those inside a CODE or object logger.
  • Bug Fixes
    • A clone is now checked like new(): bad overrides croak instead of being accepted, and a clone that adds syslog gets a script_name.
    • format => 'json' wrote objects inside arrays or hashes, NaN and infinite numbers as null; they are now strings.
    • Non-ASCII email is now sent with MIME headers, as UTF-8.
    • A message with wide characters failed to be sent to syslog; syslog now gets UTF-8.
    • A report that syslog failed is not held back by sendmail's min_interval.
    • A closed or broken fd, and the warnings about journald, email, Log::Any and Log::Dispatch failures, can no longer end a program whose __WARN__ handler dies.
    • A syslog failure, including one from setlogsock() or openlog(), can no longer stop the program. Instead of a carp, it is now logged once, at error level, to the other backends, saying why and how the syslog daemon was being contacted; it is carped only if there is no other backend.
  • Enhancements
    • When syslog, or a CODE or object logger, recovers, a warning says how many messages were not delivered.
    • JSON is encoded by JSON::MaybeXS, which uses Cpanel::JSON::XS or JSON::XS if installed, so format => 'json' is faster with either.
    • New dependencies: JSON::MaybeXS, MIME::Base64 and MIME::QuotedPrint.

Documentation

Modules

Logging Abstraction Layer
base class of the Log::Abstraction backends
push messages onto an array
call a code reference with each message
print messages to a file handle
append messages to a file
send messages to the systemd journal
send messages on to Log::Any
send messages on to Log::Dispatch
call a logger object's method for each message
send messages to syslog
Log::Any adapter backed by Log::Abstraction