#Disabling Logger
If you are not satisfied with the noisy logs that library emit, or wish to not receive logs in production, follow the steps below.
Remember: Disabling the logs you may lose unresolved points in your application/project, that probably will cause a reproduction not expected.
- The library has integrated support to disable this system.
#Disabling in Production
- Import the object logger.
- Next, call the method disable() that belongs to the logger.
import { logger } from '@hitechline/reactools';
// Application main
if (process.env.NODE_ENV === 'production') {
logger.disable();
}
#Disabled by default
import { logger } from '@hitechline/reactools';
// Application main
logger.disable();