NAME

Log::Abstraction::Backend::LogAny - send messages on to Log::Any

VERSION

0.40

DESCRIPTION

Built for the log_any key of a logger hash, or a Log::Any logger (Log::Any::Proxy) as the logger. A category name is looked up with Log::Any->get_logger() for the first message. The message goes to the method for its level (warn becomes warning), with the structured fields as Log::Any's trailing hash reference; with a format, the formatted line instead. If Log::Any dies, it carps.

Nothing is sent while a message is already being forwarded (see $Log::Abstraction::Backend::FORWARDING), so a message that comes back through Log::Any::Adapter::Abstraction doesn't loop.

For use by Log::Abstraction only; see Log::Abstraction::Backend.

METHODS

new

my $backend = Log::Abstraction::Backend::LogAny->new(
    log_any => $proxy_or_category, level => $level, format => $format,
);

emit

$backend->emit($logger, $event);

AUTHOR

Nigel Horne njh@nigelhorne.com

SEE ALSO

Log::Abstraction, Log::Abstraction::Backend

COPYRIGHT AND LICENSE

Copyright (C) 2025-2026 Nigel Horne

Usage is subject to the GPL2 licence terms. If you use it, please let me know.