NAME

Nginx::Log::Entry - This class represents a single line from the Nginx combined access log (the default access log format). It may work with the combined Apache log too, but I have not tested this.

SUBROUTINES/METHODS

new

Instantiates a new entry object.

get_ip

Returns the requestor's ip address.

get_datetime_obj

Returns a Time::Piece object of the request datetime.

get_timezone

Returns the timezone GMT modifier, e.g. -400.

was_robot

Returns 1 if the useragent string was a known robot, else returns 0.

get_status

Returns the http status number of the request.

get_request

Returns the request string.

get_request_type

Returns the http request type, e.g. GET.

get_request_url

Returns the requested url (excluding the base).

get_request_http_version

Returns http/1 or http/1.1.

was_request_successful

Returns 1 if the http status is a 200 series number (e.g. 200, 201, 202 etc), else returns 0.

get_useragent

Returns the useragent string.

get_os

Returns the operating system, e.g. Windows.

get_browser

Returns the browser type, e.g. Firefox.

get_referer

Returns the referer, e.g. google.com.

get_bytes

Returns the number of bytes sent, e.g. 754.

get_remote_user

Returns the remote username. This is usually not set, and if not, returns '-' instead.