Giter VIP home page Giter VIP logo

logauditor's Introduction

LogAuditor

LogAuditor application to audit log i.e. it will Scan each line from the log file and checks if it's a starter or finisher log. It identifies the alert criteria & inserts into database and show the output on the console.

Requirements

Eclipse - Enterprise Java Developers Oxygen Release (4.12.0)
Java - 1.8
Gradle - 5.6.2

Assumptions

  1. I Assumed that only one log file is copied into the folder everytime. The application just picks a file from the path and doesnt delete the file.

  2. If the file has a mismatch of start and finish logs count which means their counter parts are missing and may be available in the next file. Hence the log that is orphan(like start missing its finish vice versa), is still retained in a Map in the program.

  3. Although there was a problem creating a file of larger memory, this program has been tested for the file of size 200Mb.

  4. There can still be lot of junit test cases written. In the interest of time, I wrote only few.

Pre-run steps

Information before running the project

  1. Goto command prompt enter c:\users>Path to service project>\LogAuditor
  2. press enter.
  3. gradle clean
  4. press enter. It Will clean the project.
  5. gradle customFatJar
  6. press enter. It Will generate the custom Jar file which will have all dependencies which have been added in build.gradle.

Run instructions:

There are couple of ways you can run this project.

========================== Run from executable jar ================================

  1. Ensure that you have a .jar file in the folder LogAuditor\build\libs\LogAuditor-all.jar
  2. Goto command prompt enter c:\users>Path to service project\LogAuditor> java -jar .\build\libs\LogAuditor-all.jar
  3. press enter
  4. The console will ask for Enter the File location and press ENTER button :
  5. press enter.
  6. If the File format is provided as per requirement, it will Scan each line from the log file and checks if it's a starter or finisher log .
  7. It identifies the alert criteria & inserts into database and show the output on the console.

==========================================================================

========================== Run from command line ================================

  1. Goto command prompt enter c:\users>Path to service project\LogAuditor> gradle run
  2. press enter
  3. gradle run
  4. The command line will ask for Enter the File location and press ENTER button :
  5. press enter.
  6. If the File format is provided as per requirement, it will Scan each line from the log file and checks if it's a starter or finisher log .
  7. It identifies the alert criteria & inserts into database and show the output on the console.

==========================================================================

========================== Run as main class from Eclipse ========================

  1. Open LogAuditor project in eclipse and refresh it using F5.
  2. Right click on Java file com.admin.process.logs.Application.java -> Run as -> Java Application.
  3. The console will ask for Enter the File location and press ENTER button :
  4. press enter.
  5. If the File format is provided as per requirement, it will Scan each line from the log file and checks if it's a starter or finisher log .
  6. It identifies the alert criteria & inserts into database and show the output on the console.

===========================================================================

========================== Running Junit Test cases ================================

  1. In the eclipse, go to the java class LogAuditorTestAll.java
  2. right click and Run as -> JUnit Test
  3. Junit tests will also be run automatically when you try to generate an executable from the eclipse.

===========================================================================

logauditor's People

Contributors

ravidevops03 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.