Group
Extension

Matches 1

Plack-Middleware-AccessLog-Structured ( M/MS/MSTOCK/Plack-Middleware-AccessLog-Structured-0.002000.tar.gz, MSTOCK, 2021; MetaCPAN )
Plack-Middleware-AccessLog-Structured/lib/Plack/Middleware/AccessLog/Structured.pm ( view source; MetaCPAN )
Plack::Util::Accessor qw(logger callback extra_field);
use Net::Domain qw(hostname hostfqdn);
use JSON;


sub new {
	my ($class, $arg_ref) = @_;

	my $self = $class->next::method($arg_ref);
	if (defin
ogger = $self->logger() || sub { $env->{'psgi.errors'}->print($_[0] . "\n") };
		$logger->(encode_json($log_entry));

		return;
	});
}


# Taken from Plack::Middleware::AccessLog
sub _safe {
	my ($str
e example is used with a basic L<PSGI|PSGI> application that simply
returns C<ok>, the following, JSON-encoded message would be logged (on one log
line):

	{
		"remote_addr": "127.0.0.1",
		"request_m

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.