SG LOG: Difference between revisions
No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
Logging settings can be modified using the <code>--log-level=[level]</code> [[command line]] option, detailed help about most available command line options can be obtained from the fgfs executable by calling it with the following arguments: <code>--help --verbose</code>. | Logging settings can be modified using the <code>--log-level=[level]</code> [[command line]] option, detailed help about most available command line options can be obtained from the fgfs executable by calling it with the following arguments: <code>--help --verbose</code>. | ||
< | <pre> | ||
--log-level={bulk,debug,info,warn,alert} | --log-level={bulk,debug,info,warn,alert} | ||
Specify which logging level to use | Specify which logging level to use | ||
Line 12: | Line 12: | ||
Specify which logging class(es) to use | Specify which logging class(es) to use | ||
</ | </pre> | ||
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]]. See [[Logging properties]] and [[Generic protocol]] for more details. | 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]]. See [[Logging properties]] and [[Generic protocol]] for more details. |
Revision as of 20:59, 28 January 2016
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.
Logging settings can be modified using the --log-level=[level]
command line option, detailed help about most available command line options can be obtained from the fgfs executable by calling it with the following arguments: --help --verbose
.
--log-level={bulk,debug,info,warn,alert} Specify which logging level to use --log-class=[ai,environment,flight,general,io,network,sound,terrain,...] Specify which logging class(es) to use
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. See Logging properties and Generic protocol for more details.
The standard mechanism for making FlightGear "log" stuff to the console (or log file) is using the SG_LOG() macro
|