4 examples
Excessive logging
Excessive logging statements causing performance or readability issues.
[ FAQ1 ]
What is excessive logging?
Excessive logging occurs when an application logs too much information, often at overly verbose or unnecessary levels like debug, producing large volumes of logs that obscure important messages. This log spam can degrade application performance, complicate log analysis, and increase storage and processing costs. Typically, excessive logging results from improper log-level configuration, debugging statements left in production, or overly granular logging practices.
[ FAQ2 ]
How to fix excessive logging in code
To fix excessive logging, carefully configure log levels (such as ERROR, WARN, INFO, DEBUG) to ensure only meaningful, context-appropriate information is recorded in production environments. Remove or refactor verbose debug statements after resolving issues, reducing unnecessary log output. Implement log rotation, structured logging, or sampling techniques to manage log volume effectively. Regularly review and audit logging practices, balancing the need for debugging information with performance considerations and readability, ensuring logs remain useful and manageable.
diff block
greptile
style: Consider setting ACTIVE_LOCAL_LOG_SYSTEM to false by default in sample file to prevent excessive logging
diff block
greptile
excessive logging in filter callback may impact performance with large workflow lists
diff block
greptile
style: This debug log statement may generate excessive logging in production since it's at info level and runs on every tuple pack operation. Consider removing or changing to trace level.
suggested fix
+ tracing::trace!(?t, "packing tuple");
+ t.pack(w, tuple_depth)
Want to avoid this bug in your codebase? Try Greptile.
Avoid this bug!