cardiff: Adding do_print to manage print levels

cardiff is using many print messages to inform user about 3 categories :
INFO / WARNING / ERROR.

Let's make a function where all those types are defined. We can also
control what message we want to see via print_level.
cardiff: Porting to do_print

Let's use do_print to handle the printing properly with defined levels.
The next step will be to filter the level we want to report.