Skip to content

Commit

Permalink
fix(log-level): Change log level info to debug (#282)
Browse files Browse the repository at this point in the history
UIC-2464
  • Loading branch information
avantika-karwasara authored Apr 15, 2020
1 parent 92bcd5e commit 273ea46
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion superset/connectors/sqla/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ def query(self, query_obj):
status = utils.QueryStatus.SUCCESS
error_message = None
df = None
logging.info('[PERFORMANCE CHECK] SQL Query formation time {0} '.format(datetime.now() - qry_start_dttm))
logging.debug('[PERFORMANCE CHECK] SQL Query formation time {0} '.format(datetime.now() - qry_start_dttm))
db_engine_spec = self.database.db_engine_spec
try:
df = self.database.get_df(sql, self.schema)
Expand Down
4 changes: 2 additions & 2 deletions superset/hive_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def default_hive_query_generator(sql, query_obj, database, datasource_name):
if st and en and gran_seconds:
where_clause = get_partitioned_whereclause(st, en, gran_seconds, time_partitions)
sql_updated = replace_whereclause_in_org_sql(granularity, sql, where_clause, granularity_in_partitions)
logging.info('[PERFORMANCE CHECK] Hive Partition Query formation time {0} '.format(datetime.now() - st_seconds))
logging.debug('[PERFORMANCE CHECK] Hive Partition Query formation time {0} '.format(datetime.now() - st_seconds))
return sql_updated
logging.info('[PERFORMANCE CHECK] Hive Partition Query formation time {0} '.format(datetime.now() - st_seconds))
logging.debug('[PERFORMANCE CHECK] Hive Partition Query formation time {0} '.format(datetime.now() - st_seconds))
return sql
8 changes: 4 additions & 4 deletions superset/models/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -867,9 +867,9 @@ def _log_query(sql):

_log_query(sqls[-1])
self.db_engine_spec.execute(cursor, sqls[-1])
logging.info('[PERFORMANCE CHECK] query response time from db {0} '.format(datetime.now()-st_seconds))

logging.debug('[PERFORMANCE CHECK] query response time from db {0} '.format(datetime.now()-st_seconds))

st_seconds = datetime.now()
if cursor.description is not None:
columns = [col_desc[0] for col_desc in cursor.description]
Expand All @@ -886,7 +886,7 @@ def _log_query(sql):
if v.type == numpy.object_ and needs_conversion(df[k]):
df[k] = df[k].apply(utils.json_dumps_w_dates)

logging.info('[PERFORMANCE CHECK] pandas data frame formation time after response {0} '.format(datetime.now()-st_seconds))
logging.debug('[PERFORMANCE CHECK] pandas data frame formation time after response {0} '.format(datetime.now()-st_seconds))
return df

def compile_sqla_query(self, qry, schema=None):
Expand Down
8 changes: 4 additions & 4 deletions superset/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ def query_obj(self):
'prequeries': [],
'is_prequery': False,
}
logging.info('[PERFORMANCE CHECK] Query Obj formation time {0} '.format(datetime.now() - st_seconds))
logging.debug('[PERFORMANCE CHECK] Query Obj formation time {0} '.format(datetime.now() - st_seconds))
return d

@property
Expand Down Expand Up @@ -408,12 +408,12 @@ def get_payload(self, query_obj=None):
payload['error'] = 'No data'
else:
payload['data'] = self.get_data(df)
logging.info('[PERFORMANCE CHECK] df to for vis data convertion time {0} '.format(datetime.now() - st_seconds_1))

logging.debug('[PERFORMANCE CHECK] df to for vis data convertion time {0} '.format(datetime.now() - st_seconds_1))

if 'df' in payload:
del payload['df']
logging.info('[PERFORMANCE CHECK] Total Time in execute request and transform to vis data {0} '.format(datetime.now()-st_seconds))
logging.debug('[PERFORMANCE CHECK] Total Time in execute request and transform to vis data {0} '.format(datetime.now()-st_seconds))
return payload

def get_df_payload(self, query_obj=None, **kwargs):
Expand Down

0 comments on commit 273ea46

Please sign in to comment.