|
|
|
|
|
by bbayles
1514 days ago
|
|
The first is better also because you can do things with loggers other than print out their contents. For example, suppose you had a statement like: logger.debug('Database error: %s', error_message)
You probably have a logging handler that did the normal string. But you can also have one that keeps a count of how many `Database error: %s` hits there are (as opposed to `Network error: %s`) there are over time. Doing the string substitution would break this aggregation. |
|