10/10 would watch this serie
Episode Request: Logging with Laravel
A request for a video on logging: What are the features of the log class, what are best practices, when to log, what to log, what not to log, how to seamlessly switch between loggers (database, file, 3rd party services) does logging affect performance? what tools one can use to read the log? is logging just for lumberjacks? is logging just for knowing whats happening or can one use a log to collect data for metrics?
Anyone else got questions, suggestions for content?
+1
Yeah that would be great! I often use Laravel logging to log errors for my API when something could not imported or something similar. But this bloats my controller and I guess this is not the right approach. Additionally the Laravel logger class is missing some features like creating special files instead using the standard file oder standard daily files.
+1
Request from me to
I was just thinking the same thing this weekend. Also: Examples of when to use each of the error levels, i.e. if a user fails to provide valid input, should the application code log an error, warning, or info (since we sanitized the invalid input).
+1
How can we get the attention of Jeffrey?
+1 Would appreciate!
is logging just for lumberjacks? I wanna know the answer of this question too!
+1, great idea for a video! I support it.
+1 go for it @jeffreyway :)
+1 I'd like to see some best practices.
+1 I'm interested in some best practices on this subject.
Maybe I under utilize the log system as in production I rarely log anything. To much of a pain to get the logs. If it's my project I send emails to my self. If it is a client I have it logged to database so I can log in and see right away.
So I would love this too, but not a priority for me.
+1 to a "Advanced Logger Service + Best Practices" - series.
+1
+1
+1
+1 Could help in debugging, Catching Unexpected Errors, and Logging Each Request with IP address, to know who is trying SQL Injections on my application. And the list goes on... @JeffreyWay If you are reading this thread, then please its a request from all your fans and your students, Please make videos on this topic. :)
+1
+1
Nobody's mentioned this, but Loggly suggests using JSON format for log files, which doesn't work out of the box with the Log methods (well, partial credit for using the second parameter). How about showing how to override Monolog default behavior?
This would be a fantastic lesson or series, and it looks like there's tons of interest... Any chance @JeffreyWay will take pity on us and put it together? :)
Hello everybody, I developed a package to record the requests my application, I was inspired enough in a similar project NodeJS, the morgan. Case are interested and if it is useful, follow the link.
Yes! +1 for the suggestion!
And also some use cases for logging to a web service (like Loggly) that can be used in App\Exceptions\Handler::report(). And also, some use cases working with Monolog Handlers.
Yes this would be a pretty good series. I've begun to think about logging within my exception classes, so when that exception is thrown it also creates a line in my log file. Truth is though, I guess I'm more bothered about genuine site errors than I am user mistakes so would love to see how Jeff uses it on Laracasts etc.
I know @JeffreyWay worries about running out of material to videocast about but I think we could keep him in business until he's a very old man!
@Cirra Yes! True! Monolog has a built-in Formatters, among these there are a JsonFormatter and a LogglyFormatter.
So nothing new, just using the monolog library, that Laravel uses internally. Maybe watching a tutorial or reading an article on how to use Formatters and Handlers would do the trick.
Would also watch the crap out of this series.
+1
+1 , would like to see it too.
I will be interested in this series as well.
+1
+1 and maybe explore ways to have sms notifications to admins based on conditions being logged(???)
Please or to participate in this conversation.