ComposerLinter uses logging and `warns`
"""This module exports the ComposerLinter subclass of Linter."""
+import codecs
import json
import hashlib
-import codecs
+import logging
from os import path, access, X_OK
from .. import linter, util
+logger = logging.getLogger(__name__)
+
+
class ComposerLinter(linter.Linter):
"""
This Linter subclass provides composer-specific functionality.
@@ -55,9 +59,8 @@ class ComposerLinter(linter.Linter):
local_cmd = self.find_local_cmd_path(cmd[0])
if not local_cmd and not global_cmd:
- msg = 'WARNING: {} cannot locate \'{}\''.format(self.name, cmd[0])
- util.printf(msg)
- util.message(msg)
+ logger.warning(
+ 'WARNING: {} cannot locate \'{}\''.format(self.name, cmd[0]))
return True, None
composer_cmd_path = local_cmd if local_cmd else global_cmd
