Skip to content

Commit

Permalink
Add debug log
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandre-normand committed Aug 30, 2022
1 parent 19a4d1a commit d235547
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ddtrace/tracer/sqlcomment.go
Expand Up @@ -12,6 +12,7 @@ import (
"gopkg.in/DataDog/dd-trace-go.v1/ddtrace"
"gopkg.in/DataDog/dd-trace-go.v1/ddtrace/ext"
"gopkg.in/DataDog/dd-trace-go.v1/internal/globalconfig"
"gopkg.in/DataDog/dd-trace-go.v1/internal/log"
)

// SQLCommentInjectionMode represents the mode of SQL comment injection.
Expand Down Expand Up @@ -147,6 +148,9 @@ func commentQuery(query string, tags map[string]string) string {
if query == "" {
return b.String()
}
if log.DebugEnabled() {
log.Debug("Injected sql comment %s", b.String())
}
b.WriteRune(' ')
b.WriteString(query)
return b.String()
Expand Down

0 comments on commit d235547

Please sign in to comment.