Skip to content

rohanraj7316/logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logger

this is just a wrapper on zap

Integration

either you can import default config and edit it out according to your needs or you can use Config struct to create your own config. for example:

  • importing default config and then edit out the values according to your needs
lOptions := logger.ConfigDefault

// edit it according to your needs
  • creating your own config
lOptions := logger.Options{
	JSONEncoding: true,
}
  • pass those options inside Configure function to initialize the logger.
err := logger.Configure(lOptions)

and then you can use that logger according to your needs.

Example

below are the examples which gonna help you to get started with the the integration.

example