Log-Abstraction

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

	  private helpers in the class.
	- Fixed caller-depth resolution for warn/error/fatal: file and line
	  reported to CODE-ref callbacks and all file/fd format backends now
	  correctly resolve to the caller's source location.  Previously the
	  extra _high_priority stack frame caused them to point to the module's
	  internal dispatch code.  _format_message now accepts pre-computed
	  caller_file/caller_line parameters rather than calling caller(2)
	  internally; _log computes the correct depth (1 for trace/debug/info/
	  notice; 2 for warn/error) and passes the values down.
	- Removed unreachable UNIVERSAL::isa call in _log's private-method
	  guard; replaced with the idiomatic method form (caller)[0]->isa().
	- Removed spurious File::Basename->import() guard; require + fully-
	  qualified call is sufficient.
	- Added =head1 LIMITATIONS section to Log::Abstraction documenting
	  syslog hash mutation, no-structured-fields, single-threaded email
	  throttle, and OpenTelemetry status.
	- Added =head1 LIMITATIONS section to Log::Any::Adapter::Abstraction
	  documenting nine-to-six level collapse, no-structured-fields, and
	  the recommended-not-required Log::Any dependency.

	[ Bug Fixes ]

lib/Log/Abstraction.pm  view on Meta::CPAN

#     IF self->{'file'} top-level key:
#       Validate path; format line; (eval) open>>file, print, close
#     IF self->{'fd'} top-level key:
#       Format line; print to filehandle
#   END FUNCTION
# ---------------------------------------------------------------------------
sub _log :Private {
	my ($self, $level, @messages) = @_;

	# Reject direct calls from outside this package (also enforced by :Private)
	if(!(caller)[0]->isa(__PACKAGE__)) {
		Carp::croak('Illegal Operation: _log is a private method');
	}

	# Sanity-check the level (should not be reachable in normal use)
	if(!defined($syslog_values{$level})) {
		Carp::croak(ref($self), ": Invalid level '$level'");
	}

	# Drop messages that fall below the configured threshold
	if($syslog_values{$level} > $self->{'level'}) {



( run in 1.270 second using v1.01-cache-2.11-cpan-aadc1410aed )