Open jelib3an opened 3 years ago
Similar to https://github.com/laravel/framework/pull/37591
I've been adding this trait to my commands so all outputs have timestamps on them. I find it helpful in logs or for debugging long running scripts.
trait TimestamppedOutputTrait { public function line($string, $style = null, $verbosity = null) { $string = now()->format("[Y-m-d H:i:s] ").$string; return parent::line($string, $style, $verbosity); } }
Curious, would others find this useful if it were added to laravel/framework or laravel/laravel?
Similar to https://github.com/laravel/framework/pull/37591
I've been adding this trait to my commands so all outputs have timestamps on them. I find it helpful in logs or for debugging long running scripts.
Curious, would others find this useful if it were added to laravel/framework or laravel/laravel?