mostafa-saeed / Udacity-Log-Project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Udacity-Log-Project

A database log tool. It uses psycopg2 to communicate with PostgreSQL Database, then it queries the database and wirte the results in a text file.

How to run it

  • clone the project using git clone https://github.com/mostafa-saeed/Udacity-Log-Project.
  • change the directory using cd Udacity-Log-Project.
  • Run the application using python3 app.py.
  • Then you will find logFile.txt which inclues all the results from the database.

Files explanation

  • app.py
    • This file contains the core logic of the application.
    • It also inculdes the log Function which writes a string in both terminal window and in the log file.
  • db_functions.py
    • This file contains the database string.
    • It send queries to the database and return the result.

Here's an example of the application's output

Terminal window

Terminal window output

Log file

Screenshot_from_2017_11_23_13_15_30

About

License:MIT License


Languages

Language:Python 100.0%