How to change Logging Level in Php?

At times you don't see any messages in the log file or you see a blank page instead of output or you only see fatal or critical errors but not information or notice messages etc and you may wonder why. This is because PHP has so many log level. What you see in the logs correspond to error reporting level set at global level in php.ini. This error reporting level can also be overwritten at runtime by in the script. The various error reporting levels are defined as constants and string enums as follows.