Skip to content

Commit 196b305

Browse files
committed
Use python's logger instead of persist.debug
`persist.debug()` has been deprecated a long time, we should drop it *before* it finally gets removed.
1 parent 78c5f89 commit 196b305

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

linter.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,13 @@
1010

1111
"""This module exports the Htmlhint plugin class."""
1212

13+
import logging
14+
1315
import sublime
14-
from SublimeLinter.lint import NodeLinter, persist
16+
from SublimeLinter.lint import NodeLinter
17+
18+
19+
logger = logging.getLogger("SublimeLinter.plugin.htmlhint")
1520

1621

1722
class Htmlhint(NodeLinter):
@@ -38,7 +43,7 @@ def find_errors(self, output):
3843
"""
3944
output_json = sublime.decode_value(output)
4045

41-
# persist.debug('output_json:"{}", file: "{}"'.format(output_json, self.filename))
46+
# logger.info('output_json:"{}", file: "{}"'.format(output_json, self.filename))
4247

4348
for file in output_json:
4449
for message in file['messages']:
@@ -64,7 +69,7 @@ def parse_message(self, message):
6469
message = None
6570

6671
message = 'message -- msg:"{}", line:{}, col:{}, error: {}, warning: {}, message_obj:{}'
67-
persist.debug(message.format(
72+
logger.info(message.format(
6873
error_message,
6974
line,
7075
col,

0 commit comments

Comments
 (0)