Fix a bug that logging never goes to stdout
Support Docker API 1.7