This function returns true if log is enabled, false otherwise.
You can call the log function if the log is disabled as the function will simply be ignored. You should check if log is enabled if you have to build information to send to the log file, so your application will run faster when log is disabled.