Welcome Guest, Not a member yet? Register   Sign In
log message of current class and function and line number
#2

CI3's default error and exception handlers already do this. If you look at /system/core/Common.php, the _exception_handler() function loads the Exceptions class and calls its log_exception() method, using the relevant methods on the $exception argument passed to the handler. At the very least, that should serve as an example for how to get the information from an Exception in your own code. The methods are also defined in PHP's manual, in the documentation of the Exception class.
Reply


Messages In This Thread
RE: log message of current class and function and line number - by mwhitney - 09-21-2015, 08:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB