Simple local logging container for use with HTTP from a client service.
73
Console-based logs are sent to the console.
File-based logs are stored inside the container at c:/logs
Start the container with:
docker run -d -p 8080:80 --name logger jamesasher:logger
To place logs on the HOST instead of inside the container:
docker run -d --name logger -p 8080:80 -v C:/log:C:/log jamesasher/logger
Console output on startup:
-- Logger running on http://{hostIP}:{hostPort}
URLS:
GET /
GET /api
PUT /api/log/console
PUT /api/log/file
GET /api/log/file/rotate
GET /api/status
GET /api/stop
-------------------------------------------
Configure with environment variables:
| env var | description |
|---|---|
| CONLOGGERPORT={Port} | specify the port to listen on |
| CONLOGGERFILE={path/file} | specify the path and file to place lots |
After starting logger you can review the logs sent to the console with:
docker logs logger
Call the logger with CURL:
curl --header "Content-Type: application/json" --request POST --data "This is my console log entry" http://localhost:8080/api/log/console
curl --header "Content-Type: application/json" --request POST --data "This is my file log entry" http://localhost:8080/api/log/file
curl http://localhost:8080/api/stop
Content type
Image
Digest
Size
2.1 GB
Last updated
over 7 years ago
docker pull jamesasher/logger