fixes #3246 - printing id and names of created resources

- output turned back to an object
- print_message now takes the message and arguments, which is the created/updated
  resource in case of write commands
- csv output adapter check if there is name or id available and prints it