@cryptotaxi247 / netdata-1 / commits / 81199cfb4

web_log: support for log file with pattern match addded

Ilya committed Jun 5, 2017 at 23:07 UTC 81199cfb4a24de547bbad3f1a863c14a1fcfc322
1 file changed +4 -2
python.d/web_log.chart.py
+4 -2
@@ -264,19 +264,21 @@ class Service(LogService):
264 if not self.log_path:
265 self.error('log path is not specified')
266 return False
267 + self._find_recent_log_file()
268
269 if not access(self.log_path, R_OK):
269 - self.error('%s not readable or not exist' % self.configuration['path'])
270 + self.error('%s not readable or not exist' % self.log_path)
271 return False
272
273 if not getsize(self.log_path):
273 - self.error('%s is empty' % self.configuration['path'])
274 + self.error('%s is empty' % self.log_path)
275 return False
276
277 self.configuration['update_every'] = self.update_every
278 self.configuration['name'] = self.name
279 self.configuration['override_name'] = self.override_name
280 self.configuration['_dimensions'] = self._dimensions
281 + self.configuration['path'] = self.log_path
282
283 cls = log_types[self.log_type]
284 self.Job = cls(configuration=self.configuration)