1Search::Elasticsearch::URsoelre:C:oLnotgrgiebru(t3e)d PeSrelarDcohc:u:mEelnatsattiicosnearch::Role::Logger(3)
2
3
4

NAME

6       Search::Elasticsearch::Role::Logger - Provides common functionality to
7       Logger implementations
8

VERSION

10       version 6.00
11

DESCRIPTION

13       This role provides common functionality to Logger implementations, to
14       enable the logging of events and the tracing of request-response
15       conversations with Elasticsearch nodes.
16
17       See Search::Elasticsearch::Logger::LogAny for the default
18       implementation.
19

CONFIGURATION

21   "log_to"
22       Parameters passed to "log_to" are used by
23       Search::Elasticsearch::Role::Logger implementations to setup the
24       "log_handle()".  See Search::Elasticsearch::Logger::LogAny for details.
25
26   "log_as"
27       By default, events emitted by "debug()", "info()", "warning()",
28       "error()" and "critical()" are logged to the "log_handle()" under the
29       category "elasticsearch.event", which can be configured with "log_as".
30
31   "trace_to"
32       Parameters passed to "trace_to" are used by
33       Search::Elasticsearch::Role::Logger implementations to setup the
34       "trace_handle()". See Search::Elasticsearch::Logger::LogAny for
35       details.
36
37   "trace_as"
38       By default, trace output emitted by "trace_request()",
39       "trace_response()", "trace_error()" and "trace_comment()" are logged
40       under the category "elasticsearch.trace", which can be configured with
41       "trace_as".
42
43   "deprecate_to"
44       Parameters passed to "deprecate_to" are used by
45       Search::Elasticsearch::Role::Logger implementations to setup the
46       "deprecate_handle()".  See Search::Elasticsearch::Logger::LogAny for
47       details.
48
49   "deprecate_as"
50       By default, events emitted by "deprecation()" are logged to the
51       "deprecate_handle()" under the category "elasticsearch.deprecation",
52       which can be configured with "deprecate_as".
53

METHODS

55   "log_handle()"
56       Returns an object which can handle the methods: "debug()", "debugf()",
57       "is_debug()", "info()", "infof()", "is_info()", "warning()",
58       "warningf()", "is_warning()", "error()", "errorf()", "is_error()",
59       "critical()", "criticalf()" and  "is_critical()".
60
61   "trace_handle()"
62       Returns an object which can handle the methods: "trace()", "tracef()"
63       and "is_trace()".
64
65   "deprecate_handle()"
66       Returns an object which can handle the "warnf()" method.
67
68   "trace_request()"
69           $logger->trace_request($cxn,\%request);
70
71       Accepts a Cxn object and request parameters and logs them if tracing is
72       enabled.
73
74   "trace_response()"
75           $logger->trace_response($cxn,$code,$response,$took);
76
77       Logs a successful HTTP response, where $code is the HTTP status code,
78       $response is the HTTP body and $took is the time the request took in
79       seconds
80
81   "trace_error()"
82           $logger->trace_error($cxn,$error);
83
84       Logs a failed HTTP response, where $error is an
85       Search::Elasticsearch::Error object.
86
87   "trace_comment()"
88           $logger->trace_comment($comment);
89
90       Used to insert debugging comments into trace output.
91
92   "deprecation()"
93           $logger->deprecation($warning,$request)
94
95       Issues a deprecation warning to the deprecation logger.
96

AUTHOR

98       Clinton Gormley <drtech@cpan.org>
99
101       This software is Copyright (c) 2017 by Elasticsearch BV.
102
103       This is free software, licensed under:
104
105         The Apache License, Version 2.0, January 2004
106
107
108
109perl v5.30.0                      2019-07S-e2a6rch::Elasticsearch::Role::Logger(3)
Impressum