Synthia
Generic and flexible data structure generator
examples.apache.LogLine Class Reference

Detailed Description

Representation of a line of Apache's access log.

This class contains all the fields that Apache displays in its standard log format (IP address, URL, timestamp, return code, file size).

Definition at line 31 of file LogLine.java.

Classes

class  Request
 Simple representation of an HTTP request.
 
enum  StatusCode
 The possible status codes associated to each request. More...
 

Public Member Functions

 LogLine (String ip, long timestamp, int timezone, Request req, StatusCode code, int size)
 
String toString ()
 

Static Protected Member Functions

static String formatDate (long timestamp, long timezone)
 
static int getCode (StatusCode code)
 

Protected Attributes

String m_ipAddress
 The IP address of an HTTP request. More...
 
long m_timestamp
 The date the request was made. More...
 
int m_timeZone
 The GMT offset of the timestamp. More...
 
Request m_request
 The HTTP request made. More...
 
int m_size
 The size of the object requested. More...
 
StatusCode m_statusCode
 The status code that the server sends back to the client. More...
 

Static Protected Attributes

static final transient DateFormat m_dateFormat = new SimpleDateFormat("d-MMM-yyyy HH:mm:ss z")
 A formatter for dates. More...
 

Constructor & Destructor Documentation

◆ LogLine()

examples.apache.LogLine.LogLine ( String  ip,
long  timestamp,
int  timezone,
Request  req,
StatusCode  code,
int  size 
)

Definition at line 73 of file LogLine.java.

Member Function Documentation

◆ formatDate()

static String examples.apache.LogLine.formatDate ( long  timestamp,
long  timezone 
)
staticprotected

Definition at line 96 of file LogLine.java.

◆ getCode()

static int examples.apache.LogLine.getCode ( StatusCode  code)
staticprotected

Definition at line 102 of file LogLine.java.

◆ toString()

String examples.apache.LogLine.toString ( )

Definition at line 85 of file LogLine.java.

Member Data Documentation

◆ m_dateFormat

final transient DateFormat examples.apache.LogLine.m_dateFormat = new SimpleDateFormat("d-MMM-yyyy HH:mm:ss z")
staticprotected

A formatter for dates.

Definition at line 41 of file LogLine.java.

◆ m_ipAddress

String examples.apache.LogLine.m_ipAddress
protected

The IP address of an HTTP request.

Definition at line 46 of file LogLine.java.

◆ m_request

Request examples.apache.LogLine.m_request
protected

The HTTP request made.

Definition at line 61 of file LogLine.java.

◆ m_size

int examples.apache.LogLine.m_size
protected

The size of the object requested.

Definition at line 66 of file LogLine.java.

◆ m_statusCode

StatusCode examples.apache.LogLine.m_statusCode
protected

The status code that the server sends back to the client.

Definition at line 71 of file LogLine.java.

◆ m_timestamp

long examples.apache.LogLine.m_timestamp
protected

The date the request was made.

Definition at line 51 of file LogLine.java.

◆ m_timeZone

int examples.apache.LogLine.m_timeZone
protected

The GMT offset of the timestamp.

Definition at line 56 of file LogLine.java.


The documentation for this class was generated from the following file: