Rails development log not updating ng pagdating ng
So let's review the logging levels available and what they mean.
So, when logging messages to yourself or your band of merry developers, make sure to log at the correct level.
Another great feature of the Rails logger involves tags.
Tags help categorize different logs for different use cases.
As for the message format that gets printed to the log, we have some additional changes we can make.
For example, let's say we don't like the standard output and would like to mix things up a bit.
Once you start using tags, you'll find more and more creative uses that provide value.
Next, let's consider the user of the logs, who might be you; or it might be someone on your team, in operations, or in customer support.
As shown below, we're setting the format specification to show the log message's datetime and message and the program's name. Perhaps you'll want to log information in a different format based on what's in the message. Using classes makes an easier transition to complex logic for logs.
We will look at the Rails logger and some logging best practices.