Difference between revisions of "API:EPrints/Apache/LogHandler"

From EPrints Documentation
Jump to: navigation, search
 
Line 15: Line 15:
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
 
</div>
 
</div>
<!-- Pod2Wiki=head_configuration -->
+
<!-- Pod2Wiki=head_description -->
==CONFIGURATION==
+
==DESCRIPTION==
 
To enable the Apache::LogHandler add to your ArchiveConfig:
 
To enable the Apache::LogHandler add to your ArchiveConfig:
  
Line 54: Line 54:
 
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%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
Line 89: Line 89:
 
<!-- Pod2Wiki=head_methods -->
 
<!-- Pod2Wiki=head_methods -->
 
==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%; '>
 
<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>
 
<span style='display:none'>User Comments</span>
Line 97: Line 106:
 
</div>
 
</div>
 
<!-- Pod2Wiki=item_eprints_apache_loghandler_handler -->
 
<!-- Pod2Wiki=item_eprints_apache_loghandler_handler -->
===eprints_apache_loghandler_handler===
+
====eprints_apache_loghandler_handler====
  
 
  EPrints:Apache::LogHandler::handler
 
  EPrints:Apache::LogHandler::handler
Empty (as deprecated) handler method.
+
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%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
Line 110: Line 119:
 
</div>
 
</div>
 
<!-- Pod2Wiki=item_is_robot -->
 
<!-- Pod2Wiki=item_is_robot -->
===is_robot===
+
====is_robot====
  
 
  EPrints:Apache::LogHandler::is_robot( $r, $ip )
 
  EPrints:Apache::LogHandler::is_robot( $r, $ip )
Test if request $r is a robot based on <em>User-Agent</em> or if $ip is listed as a robot.
+
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 boolean dependent or whether request has determined to be 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%; '>
 
<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>
 
<span style='display:none'>User Comments</span>
Line 125: Line 143:
 
</div>
 
</div>
 
<!-- Pod2Wiki=item_document -->
 
<!-- Pod2Wiki=item_document -->
===document===
+
====document====
  
 
  $handler-&gt;document( $r )
 
  $handler-&gt;document( $r )
Line 138: Line 156:
 
</div>
 
</div>
 
<!-- Pod2Wiki=item_eprint -->
 
<!-- Pod2Wiki=item_eprint -->
===eprint===
+
====eprint====
  
 
  $handler-&gt;eprint( $r )
 
  $handler-&gt;eprint( $r )
Line 153: Line 171:
 
==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%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>

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


API: Core API

Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki


NAME

EPrints::Apache::LogHandler - Main handler for Apache log events

User Comments


DESCRIPTION

To enable the Apache::LogHandler add to your ArchiveConfig:

  $c->{loghandler}->{enable} = 1;
 

User Comments


DATA FORMAT

User Comments


requester

The requester is stored using their IP in URN format: urn:ip:x.x.x.x.

User Comments


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).

User Comments


referent, referringEntity

These are stored in URN format: info:oai:repositoryid:eprintid.

User Comments


referent_docid

The document id as a fragment of the referent: #docid.

User Comments


METHODS

User Comments


Class Methods

User Comments


eprints_apache_loghandler_handler

EPrints:Apache::LogHandler::handler

Empty (as deprecated) handler method.

User Comments


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.

User Comments


Object Methods

User Comments


document

$handler->document( $r )

A request on a document.

User Comments


eprint

$handler->eprint( $r )

A request on an eprint abstract page.

User Comments


SEE ALSO

EPrints::DataObj::Access

User Comments


COPYRIGHT

© Copyright 2023 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/.

User Comments