We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cba9a92 commit 58749c5Copy full SHA for 58749c5
plugins/query-log/index.ts
@@ -88,12 +88,17 @@ export class QueryLogPlugin extends StarbasePlugin {
88
this.state.endTime.getTime() - this.state.startTime.getTime()
89
90
// Queries can be omitted from
91
- if (
92
- opts.dataSource &&
93
- !opts.sql.toUpperCase().trim().startsWith(this.omitPrefix) &&
94
- this.omitEnabled
95
- ) {
96
- this.addQuery(opts?.dataSource)
+ if (opts.dataSource) {
+ if (
+ (this.omitEnabled &&
+ !opts.sql
+ .toUpperCase()
+ .trim()
97
+ .startsWith(this.omitPrefix)) ||
98
+ !this.omitEnabled
99
+ ) {
100
+ this.addQuery(opts?.dataSource)
101
+ }
102
}
103
104
// Do a purge action for older than TTL items
0 commit comments