src/Main/fg_init.cxx: use /sim/log-file-line to control output of file:line in logs.
We call sglog().setFileLine() in response to changes to /sim/log-file-line.
This commit is contained in:
parent
10414fada4
commit
335547160c
1 changed files with 13 additions and 0 deletions
|
@ -532,6 +532,17 @@ static void createBaseStorageDirForAddons(const SGPath& exportDir)
|
|||
}
|
||||
}
|
||||
|
||||
struct SimLogFileLine : SGPropertyChangeListener
|
||||
{
|
||||
SimLogFileLine() {
|
||||
fgAddChangeListener(this, "/sim/log-file-line");
|
||||
}
|
||||
virtual void valueChanged(SGPropertyNode* node) {
|
||||
bool fileLine = node->getBoolValue();
|
||||
sglog().setFileLine(fileLine);
|
||||
}
|
||||
};
|
||||
|
||||
// Read in configuration (file and command line)
|
||||
int fgInitConfig ( int argc, char **argv, bool reinit )
|
||||
{
|
||||
|
@ -575,6 +586,8 @@ int fgInitConfig ( int argc, char **argv, bool reinit )
|
|||
|
||||
fgSetBool("/sim/developer-mode", developerMode);
|
||||
sglog().setDeveloperMode(developerMode);
|
||||
|
||||
static SimLogFileLine simLogFileLine;
|
||||
|
||||
#ifdef ENABLE_SWIFT
|
||||
//Set standard settings for swift connection
|
||||
|
|
Loading…
Reference in a new issue