|
From: James T. <ja...@fl...> - 2020-06-20 13:21:06
|
Mostly for Jules, but:
> src/Scripting/NasalSys.cxx: Optionally prefix all Nasal output with Nasal file:line.
>
> Depends on /sim/nasal-log-file-line. E.g. enable with:
>
> --prop:/sim/nasal-log-file-line=1.
There’s some details here: we are deprecating and removing Nasal print() where possible in favor log logprint which takes a priority level.
This is part of the goal that we achieve zero output at log-level at alert, and everything shown at ‘warn; is really a warning, not just information.
Secondly, I don’t think there is any reasons to make this optional, there is no value in __FILE__ or __LINE__ for such a message, so you can skip the listener and just change the default.
Finally, C++11 nag, you used virtual rather than override for your listener, at least my IDEs yell at me for overrides which are not marked as such.
Related, I think it’s high time we added a lambda-listener to SGPropertyNode, to get rid of these trivial listener subclasses:
auto foo = prop->addValueChangeListener([](const SGPropertyNode* node) { …. });
// return value is an SGPropertryChangeListener*, internally will an instance of LambdaValueChangeListener : public SGPropertyCHangeListener
// this also allows re-use on other props
prop->removeChangleListener(foo);
Kind regards,
James
|