
Company News
/Security News
Socket Selected for OpenAI's Cybersecurity Grant Program
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.
jm-log-parser
Advanced tools
This is a simple log file parser that reads a Nginx access log file and returns some statistics about it. The log file parser has been built using Typescript and is designed to run on the Node.js runtime. It has been built to handle large log files and is able to parse them in a streaming fashion.
To start using the log file parser, you need to have Node.js installed on your machine. You can download it from the official website: https://nodejs.org/en/download/, or you can use one of the many alternative installation methods available. We recommend using the latest LTS version of Node.js, and installing it via Volta.
Once you have Node.js installed, you can install the log file parser by running the following command:
npm install -g jm-log-parser
# or
npx jm-log-parser
This will install the log file parser globally on your machine, so you can run it from anywhere.
To use the log file parser, you need to provide it with the path to the log file you want to parse. You can do this by running the following command:
jm-log-parser -f /path/to/log/file
# or
jm-log-parser --file /path/to/log/file
This will start the log file parser and it will start reading the log file and parsing it. Once it has finished parsing the log file, it will output some statistics about the log file.
The log file parser supports the following options:
-f, --file <path>: The path to the log file you want to parse.-h, --help: Display the help message.-v, --version: Display the version number.-s, --silent: Disable output. Useful for benchmarking.--unique-ip-count: Display the number of unique IP addresses in the log file. (default: true)--active-ips <number|boolean>: Display the most active IP addresses in the log file. (default: 3)--top-urls <number|boolean>: Display the most requested URLs in the log file. (default: 3)You can use these options to customize the output of the log file parser.
Here are some examples of how you can use the log file parser:
# Parse a log file and display the default statistics
jm-log-parser -f /path/to/log/file
# Parse a log file and display the number of unique IP addresses
jm-log-parser -f /path/to/log/file --unique-ip-count
# Parse a log file and display the top 5 most active IP addresses
jm-log-parser -f /path/to/log/file --active-ips 5
# Parse a log file and display the top 10 most requested URLs
jm-log-parser -f /path/to/log/file --top-urls 10
You can combine these options to get the desired output.
To develop the log file parser, you need to have Node.js installed on your machine. You can install the development dependencies by running the following command:
npm install
You can then run the log file parser in development mode by running the following command:
npm run start -- -f /path/to/log/file
This will start the log file parser it will start reading the log file and parsing it.
You can run the compiler in watch mode by running the following command:
npm run compile:watch
This will watch for changes in the source files and recompile them automatically.
You can run the tests by running the following command:
npm test
This will run the test suite and output the results.
Or run the tests in watch mode by running the following command:
npm run test:watch
This will watch for changes in the source files and re-run the tests automatically.
FAQs
tech test data log reader
We found that jm-log-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.