SG LOG

From FlightGear wiki
Revision as of 19:58, 9 April 2019 by Gijs (talk | contribs) (Merge from SG_LOG() and cleanup)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

SG_LOG is a wrapper macro for the SimGear logstream class. By default, the logstream class writes all output to the console. SG_LOG simplifies debugging for core developers who regularly compile from source. It allows you to easily associate your debug messages with a "channel" and with a "priority". This mechanism allows users to explicitly enable to certain log messages, while ignoring others. This can be helpful in order to troubleshoot certain problems.

Usage

Logging settings can be modified using the --log-level=[level] and --log-class=[class] command line options. Where level is one of the following:

  • bulk
  • debug
  • info
  • warn
  • alert
  • popup

And class is a white space seperate list of any (combination) of the following:

If you are interested in simply logging certain properties to a file at runtime, you can use either FlightGear's built-in logging framework, or the generic protocol.

Related content

External links

Source files