GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SEARCH::ELASTICSEARCH::ROLE::LOGGER (3)

.ds Aq ’

NAME

Search::Elasticsearch::Role::Logger - Provides common functionality to Logger implementations

CONTENTS

VERSION

version 2.00

DESCRIPTION

This role provides common functionality to Logger implementations, to enable the logging of events and the tracing of request-response conversations with Elasticsearch nodes.

See Search::Elasticsearch::Logger::LogAny for the default implementation.

CONFIGURATION

CWlog_to

Parameters passed to log_to are used by Search::Elasticsearch::Role::Logger implementations to setup the log_handle(). See log_to in Search::Elasticsearch::Logger::LogAny for details.

CWlog_as

By default, events emitted by debug(), info(), warning(), error() and critical() are logged to the log_handle() under the category "elasticsearch.event", which can be configured with log_as.

CWtrace_to

Parameters passed to trace_to are used by Search::Elasticsearch::Role::Logger implementations to setup the trace_handle(). See trace_to in Search::Elasticsearch::Logger::LogAny for details.

CWtrace_as

By default, trace output emitted by trace_request(), trace_response(), trace_error() and trace_comment() are logged under the category elasticsearch.trace, which can be configured with trace_as.

METHODS

CWlog_handle()

Returns an object which can handle the methods: debug(), debugf(), is_debug(), info(), infof(), is_info(), warning(), warningf(), is_warning(), error(), errorf(), is_error(), critical(), criticalf() and is_critical().

CWtrace_handle()

Returns an object which can handle the methods: trace(), tracef() and is_trace().

CWtrace_request()



    $logger->trace_request($cxn,\%request);



Accepts a Cxn object and request parameters and logs them if tracing is enabled.

CWtrace_response()



    $logger->trace_response($cxn,$code,$response,$took);



Logs a successful HTTP response, where $code is the HTTP status code, $response is the HTTP body and $took is the time the request took in seconds

CWtrace_error()



    $logger->trace_error($cxn,$error);



Logs a failed HTTP response, where $error is an Search::Elasticsearch::Error object.

CWtrace_comment()



    $logger->trace_comment($comment);



Used to insert debugging comments into trace output.

AUTHOR

Clinton Gormley <drtech@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2015 by Elasticsearch BV.

This is free software, licensed under:



  The Apache License, Version 2.0, January 2004



Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 SEARCH::ELASTICSEARCH::ROLE::LOGGER (3) 2015-10-28

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.