futurewei-cloud / merak

Merak: Large-scale cloud emulator
MIT License
5 stars 9 forks source link

Zap logger #150

Closed phudtran closed 1 year ago

phudtran commented 1 year ago

This PR adds the zap wrapper + units tests, and the Merak Logger interface for the Merak Logger. Capabilities include

Users can create and use this logger as follows

// Logs will print to stdout and be stored under /var/log/merak/your_service_name_here
logger, err := NewLogger(INFO, "your_service_name_here")

logger.Info("The values are:", "a", "2")

// Once done sync the logs

logger.flush()