Skip to content

Reporting tool that prints out reports based on the logs

Notifications You must be signed in to change notification settings

rajdeepsharma17/logs-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Logs Analysis

Logs Analysis is a reporting tool that prints out reports (in plain text) based on the data in the database. This reporting tool is a Python program using the psycopg2 module to connect to the database.

QuickStart

This project assumes you have psycopg2 library and news database installed.

  1. If not, follow along otherwise skip to step 2.
    • Install psycopg2 using $ pip install psycopg2
    • Download data for news database here
    • Extract newsdata.sql and cd into that directory in terminal.
    • Run following command in terminal $ psql -d news -f newsdata.sql
  2. Open the Logs Analsis folder containing logsAnalysis.py in terminal.
  3. Run the following command to obtain required results:
    $ python logsAnalysis.py

Example

$ python logsAnalysis.py

The most popular articles are as follows:

  • Candidate is jerk, alleges rival - 338647 views
  • Bears love berries, alleges bear - 253801 views
  • Bad things gone, say good people - 170098 views

Authors Poularity:

  • Ursula La Multa - 507594
  • Rudolf von Treppenwitz - 423457
  • Anonymous Contributor - 170098
  • Markoff Chaney - 84557

Failed requests more than 1 percent of total request on following days:

  • 2016-07-17 - 2.26%

About

Reporting tool that prints out reports based on the logs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages