A simple HTTP service for generating JSON-formatted logs of specified sizes
250
A simple HTTP service for generating JSON-formatted logs of specified sizes. This tool is useful for testing log system performance, storage capacity, or simulating log generation scenarios.
GitHub Repository | Docker Hub
# Pull and run the container
docker run -p 3000:3000 -d kevinypfan/log-generator
The service will be available at http://localhost:3000
If you want to build the image yourself:
git clone https://github.com/kevinypfan/log-generator.git
cd log-generator
docker build -t log-generator .
docker run -p 3000:3000 -d log-generator
# Install dependencies
npm install
# Start the service
npm start
GET /log?bytes=<size>
Parameters:
bytes: Specify the size of the generated log (unit: bytes, default: 100)Example:
# Generate a log of approximately 500 bytes
curl "http://localhost:3000/log?bytes=500"
Response format:
{
"message": "Log generated",
"requestedBytes": "500",
"actualBytes": 523,
"logObject": {
"message": "Generated log of approximately 500 bytes",
"targetBytes": 500,
"actualBytes": 523,
"variation": 3,
"randomContent": "...",
"finalSize": 523
}
}
node:22-alpine3000No required environment variables at this time.
All logs are output to the console and can be viewed using docker logs.
latest: Most recent version1.x.x: Specific version tagsContent type
Image
Digest
sha256:328f49a1a…
Size
55.4 MB
Last updated
over 1 year ago
docker pull kevinypfan/log-generator