Disable disables logging by setting the internal logger to a void logger. This can be used to speed up the library if logging is not needed. It will override any custom logger that was set before and set the VoidLogger.
()
| 31 | // This can be used to speed up the library if logging is not needed. |
| 32 | // It will override any custom logger that was set before and set the VoidLogger. |
| 33 | func Disable() { |
| 34 | internal.Logger = &VoidLogger{} |
| 35 | } |
| 36 | |
| 37 | // Enable enables logging by setting the internal logger to the default logger. |
| 38 | // This is the default behavior. |
no outgoing calls