Zapper is a tiny microservice built on top of zap to function as a logging service.
Submit a POST request to the /log
endpoint with a JSON body that looks like:
{
"application": "my-app",
"message": "hello, world",
"level": "info"
}
Send a JSON message to the log_queue queue with the following format:
{
"application": "my_app",
"level": "info",
"message": "This is a test log message"
}
You can test the microservice using tools like curl for HTTP or create a custom AMQP producer to send messages to the log_queue queue.
curl -X POST -H "Content-Type: application/json" -d '{"application":"my_app","level":"info","message":"This is a test log message"}' http://localhost:8080/log
Refer to the log_amqp_producer/producer.go
file for an example of how to send messages to the log_queue queue.