Difference between revisions of "API:EPrints/Apache/LogHandler"
(New page: <!-- Pod2Wiki=_preamble_ This page has been automatically generated from the EPrints source. Any wiki changes made between the 'Pod2Wiki=*' and 'End of Pod2Wiki' comments will be lost. -...) |
|||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<!-- Pod2Wiki=_preamble_ | <!-- Pod2Wiki=_preamble_ | ||
− | This page has been automatically generated from the EPrints source. Any wiki changes made between the 'Pod2Wiki=*' and ' | + | This page has been automatically generated from the EPrints 3.4 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' comments will be lost. |
− | -->{{Pod2Wiki}}{{API:Source|file=EPrints/Apache/LogHandler.pm|package_name=EPrints::Apache::LogHandler}}[[Category:API| | + | -->{{API}}{{Pod2Wiki}}{{API:Source|file=EPrints/Apache/LogHandler.pm|package_name=EPrints::Apache::LogHandler}}[[Category:API|LOGHANDLER]][[Category:API:EPrints/Apache|LOGHANDLER]]<div><!-- Edit below this comment --> |
− | <!-- Pod2Wiki=head_name -->=NAME= | + | |
+ | |||
+ | <!-- Pod2Wiki=_private_ --><!-- Pod2Wiki=head_name --> | ||
+ | ==NAME== | ||
EPrints::Apache::LogHandler - Main handler for Apache log events | EPrints::Apache::LogHandler - Main handler for Apache log events | ||
− | <!-- | + | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> |
− | <!-- Pod2Wiki= | + | <span style='display:none'>User Comments</span> |
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=head_description --> | ||
+ | ==DESCRIPTION== | ||
To enable the Apache::LogHandler add to your ArchiveConfig: | To enable the Apache::LogHandler add to your ArchiveConfig: | ||
$c->{loghandler}->{enable} = 1; | $c->{loghandler}->{enable} = 1; | ||
− | <!-- | + | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> |
− | <!-- Pod2Wiki=head_data_format -->=DATA FORMAT= | + | <span style='display:none'>User Comments</span> |
− | <!-- | + | <!-- Edit below this comment --> |
− | <!-- Pod2Wiki=item_requester -->==requester== | + | |
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=head_data_format --> | ||
+ | ==DATA FORMAT== | ||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_requester --> | ||
+ | ===requester=== | ||
The requester is stored using their IP in URN format: <tt>urn:ip:x.x.x.x</tt>. | The requester is stored using their IP in URN format: <tt>urn:ip:x.x.x.x</tt>. | ||
− | < | + | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> |
− | <!-- | + | <span style='display:none'>User Comments</span> |
+ | <!-- Edit below this comment --> | ||
+ | |||
− | + | <!-- Pod2Wiki= --> | |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_servicetype --> | ||
+ | ===serviceType=== | ||
ServiceType is in format {{API:PodLink|file=http:|package_name=http:|section=|text=info:ofi/fmt:kev:mtx:sch_svc}}. | ServiceType is in format {{API:PodLink|file=http:|package_name=http:|section=|text=info:ofi/fmt:kev:mtx:sch_svc}}. | ||
− | The value is encoded as <tt>?name=yes</tt> (where <tt>name</tt> is one of the services defined). | + | The value is encoded as <tt>?name=yes</tt> (where <tt>name</tt> is one of the services defined). |
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
− | |||
− | |||
− | + | <!-- Pod2Wiki= --> | |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_referent_referringentity --> | ||
+ | ===referent, referringEntity=== | ||
These are stored in URN format: <tt>info:oai:repositoryid:eprintid</tt>. | These are stored in URN format: <tt>info:oai:repositoryid:eprintid</tt>. | ||
− | <!-- | + | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> |
− | <!-- Pod2Wiki=item_referent_docid -->==referent_docid== | + | <span style='display:none'>User Comments</span> |
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_referent_docid --> | ||
+ | ===referent_docid=== | ||
The document id as a fragment of the referent: <tt>#docid</tt>. | The document id as a fragment of the referent: <tt>#docid</tt>. | ||
− | <!-- | + | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> |
− | <!-- Pod2Wiki=head_methods -->=METHODS= | + | <span style='display:none'>User Comments</span> |
− | <!-- | + | <!-- Edit below this comment --> |
− | <!-- Pod2Wiki= | + | |
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=head_methods --> | ||
+ | ==METHODS== | ||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=head_class_methods --> | ||
+ | ===Class Methods=== | ||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_eprints_apache_loghandler_handler --> | ||
+ | ====eprints_apache_loghandler_handler==== | ||
+ | |||
+ | EPrints:Apache::LogHandler::handler | ||
+ | Empty (as deprecated) handler method. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_is_robot --> | ||
+ | ====is_robot==== | ||
+ | |||
+ | EPrints:Apache::LogHandler::is_robot( $r, $ip ) | ||
+ | Test if request <tt>$r</tt> is a robot based on <tt>User-Agent</tt> or if <tt>$ip</tt> is listed as a robot. | ||
+ | |||
+ | Returns a boolean dependent or whether request has determined to be a robot. | ||
+ | |||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=head_object_methods --> | ||
+ | ===Object Methods=== | ||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
− | + | <!-- Pod2Wiki= --> | |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_document --> | ||
+ | ====document==== | ||
− | + | $handler->document( $r ) | |
+ | A request on a document. | ||
− | < | + | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> |
− | <!-- | + | <span style='display:none'>User Comments</span> |
+ | <!-- Edit below this comment --> | ||
− | |||
− | + | <!-- Pod2Wiki= --> | |
+ | </div> | ||
+ | <!-- Pod2Wiki=item_eprint --> | ||
+ | ====eprint==== | ||
− | + | $handler->eprint( $r ) | |
− | + | A request on an eprint abstract page. | |
− | + | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | |
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
− | |||
− | <!-- | + | <!-- Pod2Wiki= --> |
− | <!-- Pod2Wiki=head_see_also -->=SEE ALSO= | + | </div> |
+ | <!-- Pod2Wiki=head_see_also --> | ||
+ | ==SEE ALSO== | ||
[[API:EPrints/DataObj/Access|EPrints::DataObj::Access]] | [[API:EPrints/DataObj/Access|EPrints::DataObj::Access]] | ||
− | <!-- | + | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> |
− | <!-- Pod2Wiki=_postamble_ --><!-- | + | <span style='display:none'>User Comments</span> |
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=head_copyright --> | ||
+ | ==COPYRIGHT== | ||
+ | {{API:Copyright}} | ||
+ | <div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=_postamble_ --><!-- Edit below this comment --> |
Latest revision as of 15:31, 15 March 2023
EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects
Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki
Contents
NAME
EPrints::Apache::LogHandler - Main handler for Apache log events
DESCRIPTION
To enable the Apache::LogHandler add to your ArchiveConfig:
$c->{loghandler}->{enable} = 1;
DATA FORMAT
requester
The requester is stored using their IP in URN format: urn:ip:x.x.x.x.
serviceType
ServiceType is in format info:ofi/fmt:kev:mtx:sch_svc.
The value is encoded as ?name=yes (where name is one of the services defined).
referent, referringEntity
These are stored in URN format: info:oai:repositoryid:eprintid.
referent_docid
The document id as a fragment of the referent: #docid.
METHODS
Class Methods
eprints_apache_loghandler_handler
EPrints:Apache::LogHandler::handler
Empty (as deprecated) handler method.
is_robot
EPrints:Apache::LogHandler::is_robot( $r, $ip )
Test if request $r is a robot based on User-Agent or if $ip is listed as a robot.
Returns a boolean dependent or whether request has determined to be a robot.
Object Methods
document
$handler->document( $r )
A request on a document.
eprint
$handler->eprint( $r )
A request on an eprint abstract page.
SEE ALSO
COPYRIGHT
© Copyright 2000-2024 University of Southampton.
EPrints 3.4 is supplied by EPrints Services.
http://www.eprints.org/eprints-3.4/
LICENSE
This file is part of EPrints 3.4 http://www.eprints.org/.
EPrints 3.4 and this file are released under the terms of the GNU Lesser General Public License version 3 as published by the Free Software Foundation unless otherwise stated.
EPrints 3.4 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with EPrints 3.4. If not, see http://www.gnu.org/licenses/.