-
Notifications
You must be signed in to change notification settings - Fork 13
Logging
jhshannon17 edited this page Feb 2, 2015
·
9 revisions
- -DNDEBUG must not be activated
-
-l=x (where x is a natural number) turns on logging for the particular aspect of Moby:
- 1: logs general simulator data
- 2: logs unilateral constraint solving data
- 4: logs multi-body dynamics data (Featherstone/Composite-Rigid-Body Algorithm quantities)
- 8: logs bounding volume data
- 16: unused
- 32: logs collision detection data
- 64: logs computational geometry routines
- 128: logs linear algebraic routines
- 256: logs optimization routines
Note that numbers can be or'd together to log multiple data sources. For example -l=7 will log general simulator data, unilateral constraint solving data, and multi-body dynamics data.
-
-lt=x (where x is a natural number) starts logging at a particular simulation iteration (x).
-
-lp=x (where x is a natural number) stops logging at a particular simulation iteration (x).
- To set the logging type, set reporting_level according to the same options as with moby-driver
Moby::Log<Moby::OutputToFile>::reporting_level = x;
- To specify the logging output, open OutputToFile::stream in append mode and specify your log file
Moby::OutputToFile::stream.open("logfile.txt", std::ofstream::out | std::ofstream::app);