-
Notifications
You must be signed in to change notification settings - Fork 76
Logging
To take a log you must:
- Have USE_MEMORY set to on when you make cross
- If you want to start logging automatically when the robot starts up, then set logging to initialize to true in the constructor in the LoggingBoard class (memory/log/LoggingBoard); if you want to start logging at certain points in the player behavior, call player.brain.logger.startLogging() to start and player.brain.logger.stopLogging() to stop
- Copy over the entire ~/naoqi/log folder off the robot into a local directory
- Use the qtool and browse for the directory; double clicking on it should open the log for viewing
The way we manage logging in man is by associating each Memory Object (MObject) with a Logger object. The Logger then has the duty to log the information in the Memory Object in some way. These associations are maintained in a LoggingBoard object (Think of it as a map between each MObject and its Logger). In turn each Logger is associated with an OutProvider, which provider a destination for the logger to output its data to. This separates the logging mechanism itself from the final destination, so a Logger doesn't care if its destination is local (the robot) or remote (wireless), and the OutProvider doesn't care how the information it's being given is packaged.
When a Logger object is created is it then subscribed to its associated Memory Object, so whenever a Memory Object gets updated, its associated Logger will log. It can also be done manually by calling LoggingBoard::log(MObject_ID); with a valid MObject_ID.