Correct usage of log levels - FAForever/fa GitHub Wiki

This wiki entry is taken from issue #1950

Developers often abuse the warning log level just because it's printed in a different color and presumably helps them finding their log messages a little bit. They then often forget to remove the warning logs or to change it to a decent level (or they aren't even aware of log levels).

However, 'warning' should only be used when something happened that should not happen, does not cause failures in the application but should be noticed (and fixed).

Correct usages of warning:

  • warning: Attempt to set option on unowned slot
  • warning: Shift-A is already bind (bound btw.)
  • warning: GetResource: Invalid name ""

Don't use warning for:

  • warning: Connection dialogue opening due to disconnection by players: (Don't use : either)
  • warning: NUM PROPS = 4610
  • warning: ACU kill detected. Rating for ranked games is now enforced.

Additionally, warning should be used for:

  • info: Can't find texture "" -- trying fallback.
  • info: Error popping escape handler, stack is empty

And while we're at it, never log things without context like this:

  • info: "AdvancedEngineering"
  • info: "StealthGenerator"