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

From EPrints Documentation
Jump to: navigation, search
(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 'End of Pod2Wiki' comments will be lost.
+
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|LogHandler]]<!-- End of Pod2Wiki -->
+
  -->{{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
  
<!-- End of Pod2Wiki -->
+
<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_configuration -->=CONFIGURATION=
+
<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-&gt;{loghandler}-&gt;{enable} = 1;
 
   $c-&gt;{loghandler}-&gt;{enable} = 1;
 
    
 
    
<!-- End of Pod2Wiki -->
+
<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>
<!-- End of Pod2Wiki -->
+
<!-- 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>.
  
<!-- End of Pod2Wiki -->
+
<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_servicetype -->==servicetype==
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 
  
  serviceType
+
<!-- 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 -->
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_referent_referringentity -->==referent_referringentity==
 
  
  referent, referringEntity
+
<!-- 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>.
  
<!-- End of Pod2Wiki -->
+
<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>.
  
<!-- End of Pod2Wiki -->
+
<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>
<!-- End of Pod2Wiki -->
+
<!-- Edit below this comment -->
<!-- Pod2Wiki=item_handler -->==handler==
+
 
 +
 
 +
<!-- 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 -->
 +
 
  
  handler REQUEST
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_document -->
 +
====document====
  
Called by mod_perl whenever a request is made to the web server where REQUEST is an Apache Request object.
+
$handler-&gt;document( $r )
 +
A request on a document.
  
<!-- End of Pod2Wiki -->
+
<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_uri_to_eprintid -->==uri_to_eprintid==
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
  $id = EPrints::Apache::LogHandler::uri_to_eprintid( $session, $uri )
 
  
Returns the eprint id that $uri corresponds to, or undef.
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_eprint -->
 +
====eprint====
  
<!-- End of Pod2Wiki -->
+
$handler-&gt;eprint( $r )
<!-- Pod2Wiki=item_uri_to_docid -->==uri_to_docid==
+
A request on an eprint abstract page.
  
  $id = EPrints::Apache::LogHandler::uri_to_docid( $session, $eprintid, $uri )
+
<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 -->
  
Returns the docid that $uri corresponds to (given the $eprintid), or undef.
 
  
<!-- End of Pod2Wiki -->
+
<!-- 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]]
  
<!-- End of Pod2Wiki -->
+
<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_ --><!-- End of Pod2Wiki -->
+
<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


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

User Comments