npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@4k4m1m3/log-analyzer

v0.2.0

Published

Lightweight TypeScript log parser for Linux, Apache and Nginx.

Readme

@4k4m1m3/log-analyzer

npm version

npm downloads

GitHub stars

Tests

🔎 Lightweight TypeScript log parser for security monitoring, infrastructure analysis and automation workflows.

📌 About the project

@4k4m1m3/log-analyzer is a lightweight TypeScript library designed to normalize different log formats into a common structure.

The goal is to simplify log processing, automation workflows and security event analysis by providing a simple and predictable API.

This project was created to explore log normalization concepts used in:

  • Security monitoring platforms
  • SIEM pipelines
  • SOC automation workflows
  • Infrastructure observability

This package is part of the 4k4m1m3 security learning ecosystem and is connected with the Homelab SOC project:

🌐 https://4k4m1m3.com/homelab-soc/

🚀 Features

  • Written in TypeScript
  • Zero runtime dependencies
  • Simple and predictable API
  • Automatic log format detection
  • Normalized event structure
  • Strong TypeScript support
  • Designed for security and infrastructure environments
  • Easy integration with monitoring and SIEM workflows

📦 Installation

Install using npm:

npm install @4k4m1m3/log-analyzer

⚡ Quick Start

import { analyze } from "@4k4m1m3/log-analyzer";

const log =
  "Jul 23 18:45:11 ubuntu sshd[1234]: Accepted password for root";

const result = analyze(log);

console.log(result);

Output:

{
  "ok": true,
  "entry": {
    "source": "linux-syslog",
    "timestamp": "2026-07-23T23:45:11.000Z",
    "severity": "info",
    "message": "Accepted password for root",
    "raw": "Jul 23 18:45:11 ubuntu sshd[1234]: Accepted password for root"
  }
}

📚 Supported Log Formats

Current version: 0.1.0

Supported:

✅ Linux Syslog

✅ HTTP Access Logs (Apache/Nginx compatible)

Future releases will introduce more dedicated parsers and additional log sources.

🔍 API Reference

analyze(log: string)

Receives a raw log line and attempts to automatically detect and parse the format.

Successful response:

{
  ok: true,
  entry: {
    source: string,
    timestamp: Date,
    severity: string,
    message: string,
    raw: string
  }
}

Failed response:

{
  ok: false,
  error: string,
  raw: string
}

🧪 Examples

🐧 Linux Syslog

Input:

Jul 23 18:45:11 ubuntu sshd[1234]: Accepted password for root

Output:

{
  "source": "linux-syslog",
  "severity": "info",
  "message": "Accepted password for root"
}

🌐 HTTP Access Log

Input:

127.0.0.1 - - [23/Jul/2026:18:45:11 +0000] "GET /admin HTTP/1.1" 404 512

Output:

{
  "source": "http-access",
  "severity": "warning",
  "message": "GET /admin HTTP/1.1"
}

🗺️ Roadmap

The project is under active development.

Version 0.2.0

Planned:

  • Dedicated Apache Access Log parser
  • Dedicated Nginx Access Log parser
  • Improved parser accuracy
  • Expanded automated test coverage

Version 0.3.0

Planned:

  • Additional infrastructure log formats
  • Improved metadata extraction
  • More structured security fields
  • Better event classification

Future ideas

Exploration areas:

  • 🔌 Custom parser plugins
  • 🌎 Community parser ecosystem
  • 🛡️ Security event enrichment
  • 📊 SIEM integration helpers
  • 🎯 MITRE ATT&CK metadata mapping
  • 🤖 SOC automation workflows

🛠️ Development

Clone repository:

git clone https://github.com/4k4m1m3-org/log-analyzer.git

Install dependencies:

npm install

Build:

npm run build

Run tests:

npm test

🧪 Testing

The project uses Vitest for automated testing.

Current test coverage includes:

✅ Linux Syslog parsing

✅ HTTP Access Log parsing

✅ Successful log analysis

✅ Unsupported log handling

✅ Empty input handling

🤝 Contributing

Contributions, ideas and feature requests are welcome.

If you are interested in:

  • Adding new parsers
  • Improving detection logic
  • Extending security capabilities
  • Integrating with monitoring platforms

Feel free to open an issue or submit a pull request.

🔗 Related Projects

🏠 Homelab SOC

https://4k4m1m3.com/homelab-soc/

📄 License

MIT License

Copyright (c) 2026 Wuilmer Bolivar