Skip to content

Commit

Permalink
Update to to images and readmefile
Browse files Browse the repository at this point in the history
  • Loading branch information
JaouherK committed Mar 2, 2017
1 parent 000370a commit dfa61c2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
# apache-log-parser
# Apache log-parser
## About ##
PHP based solution that implements a parser which reads the Apache access log, parses it and saves it to a database.

I joined here the folder containing the script of the apache parser. it parses the LogFormat %h %l %u %t % r %>s %b common.
Log sample line
127.0.0.1 - frank [10/Oct/2000:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 2326
I included an access log sample within the folder for test purpose.
## Description ##
I joined here the folder containing the script of the apache parser. it parses the `LogFormat %h %l %u %t % r %>s %b common`.

**Log sample line:**

127.0.0.1 - frank [10/Oct/2000:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 2326

There is no need to create the databse nor the table as this scripts creates one for each with default values. However these params can be changed directly inside the config file /Conf/config.php or passed directly as parameters in command line (see example of usage). However please change the user and password for database directly within the config file if it is not the default root user and empty password.
## Features ##

- I included an access log sample within the folder for test purpose.
- There is no need to create the database nor the table as this scripts creates one for each with default values. However these params can be changed directly inside the config file `/Conf/config.php` or passed directly as parameters in command line (see example of usage).
- This script also provides a time analysis for the exec time.
## Limits ##
Please change the user and password for database directly within the config file if it is not the default root user and empty password.
## Example ##
This is an Example of usage of this script:
``php parse.php -h'``
This command simply displays the help for this script
``php parse.php'``
This command simply Executes the script with dafault values
``php parse.php -f "path_to_file" -d "sampleDB" -t "sapmleTable"``

- ``php parse.php -h'`` : This command displays the help for this script
- ``php parse.php'`` : This command executes the script with dafault values
- ``php parse.php -f "path_to_file" -d "sampleDB" -t "sapmleTable"``:
This command parses file path_to_file and saves data inside sapmleTable within sampleDB

This script also provides a time analysis for the script to be executed.

![Alt text](/path/to/image.jpg)
File renamed without changes
File renamed without changes

0 comments on commit dfa61c2

Please sign in to comment.