diff options
author | Ilya Mashchenko <ilya@netdata.cloud> | 2022-07-12 09:39:15 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-12 09:39:15 +0300 |
commit | 806e97359488cb2ea0211d319fab687851991320 (patch) | |
tree | 03885488feb96a6b4248a6438335682f873b67f4 /collectors | |
parent | 1d9912931916a80e1f091d29defe9e3e21127c28 (diff) |
chore(python.d): improve config file parsing error message (#13363)
Diffstat (limited to 'collectors')
-rw-r--r-- | collectors/python.d.plugin/python.d.plugin.in | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/collectors/python.d.plugin/python.d.plugin.in b/collectors/python.d.plugin/python.d.plugin.in index 2f28850582..c04cb3ff05 100644 --- a/collectors/python.d.plugin/python.d.plugin.in +++ b/collectors/python.d.plugin/python.d.plugin.in @@ -572,7 +572,8 @@ class Plugin: try: statuses = JobsStatuses().from_file(abs_path) except Exception as error: - self.log.warning("error on loading '{0}' : {1}".format(abs_path, repr(error))) + self.log.error("[{0}] config file invalid YAML format: {1}".format( + module_name, ' '.join([v.strip() for v in str(error).split('\n')]))) return None self.log.debug("'{0}' is loaded".format(abs_path)) return statuses |