openSUSE/cheetah — pull request #9 by jreidinger (2012-05-28 13:45:55+00:00)
Title: create recorder class

In current state this pull request is more likely demonstration of possible improvement. I consider this way or create more universal callback. But I found it this way more comfortable.

In current state tests is broken.

What is idea? That we should have separated way how we track executing of command from executing itself. It should be construction blocks to easy replace part that doesn't fit my needs.

I use class instead of refactored method like it is before, because now user can easily send own class. It also conform to SOLID design and last but not least allows to have separate focus for each class ( cheetah focus on execution, recorder on tracking what happen in user friendly way )

Use cases:
1) private information that should not go to logs in stdin or arguments
2) private information in output
3) we are interested only in parts of output
4) we want localization in output ( we log e.g. to user )
5) we want own messages
6) we don't track information to logger interface
7) own log levels ( more versatile then previous solution )

I remove log_info and log_error level options because I found it confusing by name and also if someone want to use it in specific way, then he can do it better way now ( he can fake logger as we do it before or he can create own recorder ).