Skip to content

Commit

Permalink
fix: Show Postgres params in logs
Browse files Browse the repository at this point in the history
  • Loading branch information
paveltiunov committed Apr 24, 2020
1 parent 8da1e10 commit a678ca7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/cubejs-server-core/core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ const devLogger = (level) => (type, { error, warning, ...message }) => {
const prefix = `${requestId} ${durationStr}`;
if (query && values) {
const queryMaxLines = 50;
query = query.replace(/\$(\d+)/g, '?');
let formatted = SqlString.format(query, values).split('\n');
if (formatted.length > queryMaxLines && !allSqlLines) {
formatted = R.take(queryMaxLines / 2, formatted)
Expand Down

0 comments on commit a678ca7

Please sign in to comment.