记录日志时,printf() 类函数也可以设置上下文,使用方式如下:

<?php 

Log::context(["mode"=>"DEBUG"])->debugf("user id = %d, name = %s", 1,"Hank");