I am not sure how to pose this question. Sorry if this is already asked somewhere else: I want to log PHP errors on screen and warnings and above in a log file. Is there a way in PHP itself to set this or do I need to program a class as error handler that decides where to log?
            Asked
            
        
        
            Active
            
        
            Viewed 99 times
        
    0
            
            
        - 
                    3Check out the docs here http://php.net/manual/ro/function.set-error-handler.php and this question https://stackoverflow.com/questions/5127838/where-does-php-store-the-error-log-php5-apache-fastcgi-cpanel – ka_lin Jul 04 '17 at 12:51
1 Answers
0
            You may want to use set_error_handler(). You can catch the level of an error, therefore decide whether to show up or log to file.
FYI, php error handling
 
    
    
        BenRoob
        
- 1,662
- 5
- 22
- 24
