-
-
20 Oct 2021 09:34:55 UTC
- Distribution: Search-Elasticsearch
- Module version: 7.715
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (24)
- Testers (835 / 0 / 0)
- Kwalitee
Bus factor: 1- 67.89% Coverage
- License: apache_2_0
- Activity
24 month- Tools
- Download (129.41KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Any::URI::Escape
- Data::Dumper
- Devel::GlobalDestruction
- Encode
- File::Temp
- HTTP::Headers
- HTTP::Request
- HTTP::Tiny
- IO::Compress::Deflate
- IO::Compress::Gzip
- IO::Select
- IO::Socket
- IO::Uncompress::Gunzip
- IO::Uncompress::Inflate
- JSON::MaybeXS
- JSON::PP
- LWP::UserAgent
- List::Util
- Log::Any
- Log::Any::Adapter
- MIME::Base64
- Module::Runtime
- Moo
- Moo::Role
- Net::IP
- POSIX
- Package::Stash
- Scalar::Util
- Sub::Exporter
- Time::HiRes
- Try::Tiny
- URI
- namespace::clean
- overload
- strict
- warnings
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Search::Elasticsearch::Logger::LogAny - A Log::Any-based Logger implementation
VERSION
version 7.715
DESCRIPTION
Search::Elasticsearch::Logger::LogAny provides event logging and the tracing of request/response conversations with Elasticsearch nodes via the Log::Any module.
Logging refers to log events, such as node failures, pings, sniffs, etc, and should be enabled for monitoring purposes.
Tracing refers to the actual HTTP requests and responses sent to Elasticsearch nodes. Tracing can be enabled for debugging purposes, or for generating a pretty-printed
curl
script which can be used for reporting problems.Deprecations refers to deprecation warnings returned by Elasticsearch 5.x and above. Deprecations are logged to STDERR by default.
CONFIGURATION
Logging and tracing can be enabled using Log::Any::Adapter, or by passing options to "new()" in Search::Elasticsearch.
USING LOG::ANY::ADAPTER
Send all logging and tracing to
STDERR
:use Log::Any::Adapter qw(Stderr); use Search::Elasticsearch; my $e = Search::Elasticsearch->new;
Send logging and deprecations to a file, and tracing to Stderr:
use Log::Any::Adapter(); Log::Any::Adapter->set( { category => 'elasticsearch.event' }, 'File', '/path/to/file.log' ); Log::Any::Adapter->set( { category => 'elasticsearch.trace' }, 'Stderr' ); Log::Any::Adapter->set( { category => 'elasticsearch.deprecation' }, 'File', '/path/to/deprecations.log' ); use Search::Elasticsearch; my $e = Search::Elasticsearch->new;
USING
log_to
,trace_to
ANDdeprecate_to
Send all logging and tracing to
STDERR
:use Search::Elasticsearch; my $e = Search::Elasticsearch->new( log_to => 'Stderr', trace_to => 'Stderr', deprecate_to => 'Stderr' # default );
Send logging and deprecations to a file, and tracing to Stderr:
use Search::Elasticsearch; my $e = Search::Elasticsearch->new( log_to => ['File', '/path/to/file.log'], trace_to => 'Stderr', deprecate_to => ['File', '/path/to/deprecations.log'], );
See Log::Any::Adapter for more.
AUTHOR
Enrico Zimuel <enrico.zimuel@elastic.co>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2021 by Elasticsearch BV.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
Module Install Instructions
To install Search::Elasticsearch, copy and paste the appropriate command in to your terminal.
cpanm Search::Elasticsearch
perl -MCPAN -e shell install Search::Elasticsearch
For more information on module installation, please visit the detailed CPAN module installation guide.