sanketsaurav / lore

Logging is not lazy PYL-W1201
Performance
Major
4 years ago5 years old
Specify string format arguments as logging function parameters
58        predict.__name__ = best.name + '.predict'
59
60        rule = '/' + qualified_name + '/predict.json'
61        logger.info('Adding url rule for prediction: %s' % rule)62        app.add_url_rule(rule, view_func=predict)
Specify string format arguments as logging function parameters
320                        extra_data={"app": env.APP}
321                    )
322                except Exception as e:
323                    logger.exception('reporting to rollbar: %s' % e)324
325            sys.excepthook = report_exception
326
Specify string format arguments as logging function parameters
352                _librato_timer = None
353                _librato_start = None
354                _librato_lock = threading.RLock()
355                logger.info('connected to librato with user: %s' % os.getenv('LIBRATO_USER'))356            except:
357                logger.exception('unable to start librato')
358                report_exception()
Specify string format arguments as logging function parameters
127            if other is None:
128                other = datetime.datetime.now()
129            elif other.dtype != 'datetime64[ns]':
130                logger.warning('%s is not a datetime. Converting to datetime64[ns]' % self.column)131                other = pandas.to_datetime(other).astype('datetime64[ns]')
132
133            if series.dtype != 'datetime64[ns]':
Specify string format arguments as logging function parameters
131                other = pandas.to_datetime(other).astype('datetime64[ns]')
132
133            if series.dtype != 'datetime64[ns]':
134                logger.warning('%s is not a datetime. Converting to datetime64[ns]' % self.column)135                series = pandas.to_datetime(series).astype('datetime64[ns]')
136
137            age = (other - series)