Coder Social home page Coder Social logo

vision-log-lens's Introduction

**** This is a Next.js project ****

DISCLAIMER: THIS APP IS NOT READY FOR PRODUCTION

Welcome to Vision Log Lens

Vision Log lens helps you to quickly access insightful information about .log files

.log files supported

At the momment this app only support CLF .log files.

CLF stands for Common Log Format and is a format used by web servers when generating server log files.

CLF format example:

177.71.128.21 - - [10/Jul/2018:22:21:28 +0200] "GET /intranet-analytics/ HTTP/1.1" 200 3574 "-" "Mozilla/5.0 (X11; U; Linux x86_64; fr-FR) AppleWebKit/534.7 (KHTML, like Gecko) Epiphany/2.30.6 Safari/534.7"

Find more info about CLF files here

Web app

First, install the dependencies

npm install

Then, run the development server:

npm run dev
  1. Open http://localhost:3000 with your browser
  2. Select a valid .log file and upload it using the web-ui
  3. Check the loaded .log file
  4. Click in upload a new .log file
  5. Repeat from step 2

Backend APIs

NOTE: The same command to run the development server will start the backend APIs. There are no additional steps.

Endpoints available

/logs/list - [GET]

It will return all .log files under the folder ./public/logs

cURL example
curl --location 'http://localhost:3000/api/log/list'

/logs/upload - [POST]

Allow users to upload .log files to the folder ./public/logs

cURL example
curl --location 'http://localhost:3000/api/log/upload' \
--form 'file=@"/path/to/file/log 1.log"'

/log/load - [GET]

Allow users to load files tha have been already upload to the folder ./public/logs

curl --location 'http://localhost:3000/api/log/load/?path=77c82833-c71d-4618-8710-288e0d02ac68_log-2.log'

Useful Info

Under the folder public/logs you can find a file named 1_log.example.

This is an example log file. In order to use it, rename it to: 1-mylog.log

Then if you refresh the web-ui, you will be able to see it in the list of available logs.

Alternatively, you can also use this example .log to upload using the app.

TODO before Production

  • [ ] Extract a few hardcoded information to .env variables
  • [ ] Finish some unit tests in different parts of the app
  • [ ] Develop e2e tests using playwright or other alternatives
  • [ ] Congfigure the production build and deployment to use a CI/CD pipeline

vision-log-lens's People

Contributors

gbbrambila avatar

Watchers

 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.