debug_print_backtrace() to String for log-file

前端 未结 3 1621
一向
一向 2021-02-12 12:48

I have a problem. I would like to log the backtrace in a specific case in a log-file. debug_print_backtrace() builds a correct string for my purposes but debu

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-12 13:45

    To add on to the answer given by @HoldOffHunger, the following would have been sufficient for logging purpose:

    $this->log(print_r(debug_backtrace(), true));
    

提交回复
热议问题