go get github.com/aeeem/LogStack
this contains several, level of logging
- Info()
- Debug()
- Warn()
- Error()
Also default logging middleware contains here! The default middleware can be recover your panic error into error 500 internal server error and log it in command line interface or inside stack driver. This package did not recover panic outside main goroutine. feel free to add and change
follow these step to and setup standard boilerplate :
- Setup the env, like these :
APP_NAME="Your_App_Name"
APP_PORT=Your_Port
....
LOG_HOOKS=none
LOG_TYPES=JSON
PROJECT_ID=dekape-dev-serverYou can change following items:
- LOG_HOOKS with none or STACK
- LOG_TYPES with none or JSON
- PROJECT_ID = your-gcp-project-id
Note:You only need fill
PROJECT_IDifLOG_HOOKSis equal toSTACK. {: .note}