Skip to content

dhruva71/Zapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zapper

Zapper is a tiny microservice built on top of zap to function as a logging service.

Usage

HTTP

Submit a POST request to the /log endpoint with a JSON body that looks like:

{
    "application": "my-app", 
    "message": "hello, world", 
    "level": "info"
}

AMQP

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"
}

Testing

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.

HTTP

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

AMQP

Refer to the log_amqp_producer/producer.go file for an example of how to send messages to the log_queue queue.

About

Logging microservice built on zap

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages