Skip to main content

Log Generator 3000 - A modular log generation tool

Project description

๐ŸŒŸ Log Generator 3000 (LG3K)

LG3K Logo - AI generated and AI background removal to make it transparent

๐Ÿš€ The ultimate modular log generation tool, designed for modern systems! ๐ŸŒ

License Stars Issues

Python Version Code Style: Black Linter: Flake8 Imports: isort Tests: pytest

Last Commit Repo Size Documentation Coverage CI


About

Welcome to Log Generator 3000โ€”a fully modular log generation tool designed to simplify testing and monitoring across diverse systems. It supports web servers, APIs, databases, firewalls, and more.

This project was conceptualized, developed, and published entirely on an iPad during a Saturday evening of footballโ€”and yes, the team we were rooting for won! ๐ŸŽ‰

Curious about the full story? Read more here.


Contributing

We believe in the power of community! LG3K becomes more valuable with each new contribution, whether it's adding new log types, improving existing ones, or enhancing the core functionality.

Ways to Contribute

  1. Add New Log Types ๐Ÿ“

    • Create new modules for different systems
    • Enhance existing log formats
    • Add more realistic log patterns
  2. Improve Core Features ๐Ÿ› ๏ธ

    • Enhance performance
    • Add new configuration options
    • Improve error handling
  3. Documentation ๐Ÿ“š

    • Improve documentation
    • Add examples
    • Write tutorials
  4. Testing ๐Ÿงช

    • Add unit tests
    • Report bugs
    • Suggest improvements

Getting Started with Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature-name)
  3. Set up development environment:
    python -m venv venv
    source venv/bin/activate  # or `venv\Scripts\activate` on Windows
    pip install -r requirements-dev.txt  # Installs all development dependencies
    pip install -e .  # Install package in development mode
    pre-commit install
    
  4. Run tests:
    pytest  # Runs tests with coverage report
    
  5. Make your changes (the pre-commit hooks will ensure code quality)
  6. Write tests if applicable
  7. Update documentation if needed
  8. Commit your changes (git commit -m 'Add feature')
  9. Push to your branch (git push origin feature-name)
  10. Open a Pull Request

Development Guidelines

  • Code is formatted with Black (88 characters line length)
  • Imports are sorted with isort
  • Code quality is checked with Flake8
  • All functions and modules have docstrings
  • Changes are covered by tests (when applicable)

๐Ÿ“‚ Project Structure

lg3k/
โ”œโ”€โ”€ __init__.py          # Package initialization
โ”œโ”€โ”€ modules/             # Folder containing all log generation modules
โ”‚   โ”œโ”€โ”€ web_server.py    # Module for web server logs
โ”‚   โ”œโ”€โ”€ database.py      # Module for database logs
โ”‚   โ”œโ”€โ”€ api.py           # Module for API logs
โ”‚   โ”œโ”€โ”€ firewall.py      # Module for firewall logs
โ”‚   โ”œโ”€โ”€ nas.py           # Module for NAS logs
โ”‚   โ”œโ”€โ”€ os.py            # Module for OS logs
โ”‚   โ”œโ”€โ”€ network.py       # Module for network logs
โ”‚   โ”œโ”€โ”€ printer.py       # Module for printer logs
โ”‚   โ”œโ”€โ”€ smarthome.py     # Module for smart home devices and IoT
โ”œโ”€โ”€ utils/               # Folder containing utility functions
โ”‚   โ”œโ”€โ”€ config.py        # Utilities for configuration handling
โ”‚   โ”œโ”€โ”€ progress.py      # Utilities for progress and threading
โ”‚   โ”œโ”€โ”€ timestamp.py     # Timestamp generation utilities

โœจ Features

  • Dynamic Module Loading: Easily add new log types by creating a module in the modules/ folder.
  • Scalable and Modular: Keep your codebase clean and maintainable by separating log logic into distinct files.
  • Docker-Style Progress: Real-time progress tracking with Docker-like display for each module.
  • Smart Home Support: Generate logs for IoT devices, ESP32/ESP8266, Zigbee/Z-Wave, and security cameras.
  • High Volume: Generate up to 1,000,000 log entries per module.
  • Rich UI: Beautiful, real-time progress bar for generating logs (or use --simple mode for minimal output).
  • Fully Configurable: Modify the configuration file to control active services, total logs, threading, and more.
  • Code Quality: Enforced by Black, isort, and Flake8 through pre-commit hooks.
  • 100% Test Coverage: Comprehensive test suite ensuring reliability.

๐Ÿš€ Getting Started

Prerequisites

  • Python 3.12 or later
  • For users:
    pip install -r requirements.txt
    
  • For developers:
    pip install -r requirements-dev.txt
    pip install -e .
    pre-commit install
    

Quick Start

  1. Install the package:

    pip install lg3k
    
  2. Generate logs:

    lg3k --count 1000 --threads 4
    
  3. View help:

    lg3k --help
    

Available Modules

  • Infrastructure

    • web_server - Web server access logs
    • database - Database operations
    • api - API endpoint logs
    • firewall - Security events
    • nas - Storage operations
    • os - System logs
    • network - Network traffic
    • printer - Print jobs
  • Smart Home & IoT

    • Smart home devices (thermostats, lights, sensors)
    • ESP32/ESP8266 microcontrollers
    • Zigbee/Z-Wave devices
    • Security cameras and doorbells

๐Ÿ“Š Sample Output

Docker-Style Progress Display

1ff5d2e3: web_server   [=========>  ] 50.0%
5520ebfb: database     [==========] Complete
e9c8c5d6: api         [>         ] Waiting
7a1b3c4d: smarthome   [=======>   ] 35.0%
...

Rich UI (Default Mode)

[Thread 1] โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‰ 90% (90/100 logs)
[Thread 2] โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–Œ 100% (100/100 logs) Completed: logs_part2.json
...

Simple Mode

Starting log generation for 1000 logs across 10 files.
Thread 1 completed generating ./logs/logs_part1.json
Thread 2 completed generating ./logs/logs_part2.json
...

๐Ÿ“œ License

This project is licensed under the MIT License. See the LICENSE file for details.


๐Ÿ’ฌ Questions?

Feel free to open an issue or contact us at lg3k@dataloes.dk.


๐ŸŒŒ Show Your Support

If you love Log Generator 3000, give us a โญ on GitHub! Spread the word and help others test their systems with ease.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lg3k-0.6.3.tar.gz (19.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lg3k-0.6.3-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file lg3k-0.6.3.tar.gz.

File metadata

  • Download URL: lg3k-0.6.3.tar.gz
  • Upload date:
  • Size: 19.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for lg3k-0.6.3.tar.gz
Algorithm Hash digest
SHA256 1ee998ff8a34c17cabd923479844956e4d50966712257ab1faf353c65a692177
MD5 5d6e793f4b8feaf7039b867048c51c46
BLAKE2b-256 17a04315ca8fea78976d41e3430fb0be96a4de85a3f17e32912cbc6120f6a958

See more details on using hashes here.

File details

Details for the file lg3k-0.6.3-py3-none-any.whl.

File metadata

  • Download URL: lg3k-0.6.3-py3-none-any.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for lg3k-0.6.3-py3-none-any.whl
Algorithm Hash digest
SHA256 10571407da1dcf21fd8f93b1235193b2d71612a4ca7569e8cdeea31d07893155
MD5 b0835d53d5c04f2a72cf61e983316d44
BLAKE2b-256 74fdff256b6971c81ba1d78024fb10f6f6b9887a780b6557486f936e5d873e6d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page