1Search::Elasticsearch::ULsoegrgeCro:n:tLroigbAuntye(d3S)PeearrlchD:o:cEulmaesnttiactsieoanrch::Logger::LogAny(3)
2
3
4

NAME

6       Search::Elasticsearch::Logger::LogAny - A Log::Any-based Logger
7       implementation
8

VERSION

10       version 6.00
11

DESCRIPTION

13       Search::Elasticsearch::Logger::LogAny provides event logging and the
14       tracing of request/response conversations with Elasticsearch nodes via
15       the Log::Any module.
16
17       Logging refers to log events, such as node failures, pings, sniffs,
18       etc, and should be enabled for monitoring purposes.
19
20       Tracing refers to the actual HTTP requests and responses sent to
21       Elasticsearch nodes.  Tracing can be enabled for debugging purposes, or
22       for generating a pretty-printed "curl" script which can be used for
23       reporting problems.
24
25       Deprecations refers to deprecation warnings returned by Elasticsearch
26       5.x and above. Deprecations are logged to STDERR by default.
27

CONFIGURATION

29       Logging and tracing can be enabled using Log::Any::Adapter, or by
30       passing options to "new()" in Search::Elasticsearch.
31
32   USING LOG::ANY::ADAPTER
33       Send all logging and tracing to "STDERR":
34
35           use Log::Any::Adapter qw(Stderr);
36           use Search::Elasticsearch;
37           my $e = Search::Elasticsearch->new;
38
39       Send logging and deprecations to a file, and tracing to Stderr:
40
41           use Log::Any::Adapter();
42           Log::Any::Adapter->set(
43               { category => 'elasticsearch.event' },
44               'File',
45               '/path/to/file.log'
46           );
47           Log::Any::Adapter->set(
48               { category => 'elasticsearch.trace' },
49               'Stderr'
50           );
51           Log::Any::Adapter->set(
52               { category => 'elasticsearch.deprecation' },
53               'File',
54               '/path/to/deprecations.log'
55           );
56
57           use Search::Elasticsearch;
58           my $e = Search::Elasticsearch->new;
59
60   USING "log_to", "trace_to" AND "deprecate_to"
61       Send all logging and tracing to "STDERR":
62
63           use Search::Elasticsearch;
64           my $e = Search::Elasticsearch->new(
65               log_to   => 'Stderr',
66               trace_to => 'Stderr',
67               deprecate_to => 'Stderr'  # default
68           );
69
70       Send logging and deprecations to a file, and tracing to Stderr:
71
72           use Search::Elasticsearch;
73           my $e = Search::Elasticsearch->new(
74               log_to       => ['File', '/path/to/file.log'],
75               trace_to     => 'Stderr',
76               deprecate_to => ['File', '/path/to/deprecations.log'],
77           );
78
79       See Log::Any::Adapter for more.
80

AUTHOR

82       Clinton Gormley <drtech@cpan.org>
83
85       This software is Copyright (c) 2017 by Elasticsearch BV.
86
87       This is free software, licensed under:
88
89         The Apache License, Version 2.0, January 2004
90
91
92
93perl v5.30.0                      2019-S0e7a-r2c6h::Elasticsearch::Logger::LogAny(3)
Impressum