-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support setting log line format #39
Comments
@katzgrau What is your idea with this? I'm willing to help out but would like to have a pointer what it is that you're looking for :) |
@richjenks is having a look, but in general, being able to supply a template for the log lines inside the file. It would give the user more flexibility to make the logs readable, machine readable, etc // Example
$logger = new Katzgrau\KLogger\Logger('/var/log/', Psr\Log\LogLevel::WARNING, array (
'format' => "[date]\t[level]\t[message]",
)); |
Cool, let me know if you'd like me to help out on it as well. I don't want to start commenting on a closed issue, but perhaps we could include issue #35 in this issue in that case? wdyt @katzgrau ? (I would like to help out expand KLogger seeing as I make use of it on a daily basis, I wanna return the favor! 👍 ) |
Thanks! Let's let @richjenks implement the shortcode-style of specifying a format, and then if you're interested, maybe implement a shortcode such as |
katzgrau#39 1. Custom Formatting Accomplished with the `logFormat` option which accepts a parametized string (see readme). 2. JSON output The option `appendContext` was added which, when set to false, allows pure JSON output via the `logFormat` option (again, see readme).
Can this be closed in light of #54? |
Yep |
Provide a way to set the format that a log line is written
The text was updated successfully, but these errors were encountered: