Log file date format
Closed this issue · 2 comments
mikeerickson commented
I am looking for a way to customize the date format in API log files? I checked the apilog.php
file but doesn't exist.
Personally, I would like to have same format used by Laravel logs
Eg.
apilogger-2019-08-08.log
or, better yet in my desired format
api-2019-08-08.log
Possible config entry
<?php
return [
//currently supported drivers are 'db' and 'file'
"driver" => "file",
"filename" => "api-yyyy-mm-dd.log"
];
Thinking of a quick change to FileLogger.php:61
$filename = 'api-'.date('Y-m-d') . '.log';
If you are interested, I would be happy to make a PR for this (unless you already have plans for this capability).
aungwinthant commented
Sure. Please make a PR and I will include this in coming release. Thank you for your feedback and contribution.
mikeerickson commented
Please see PR #19
Let me know if you have any questions / changes