Added logging functionality.
Ignore result log.
API to print children and parent in a state.