-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Disable logging if gluon_pprof_disabled is set
fix: Don't log command info
- Loading branch information
1 parent
2de557a
commit 78adf76
Showing
4 changed files
with
26 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
//go:build !gluon_pprof_disabled | ||
|
||
package logging | ||
|
||
import ( | ||
"context" | ||
"runtime/pprof" | ||
) | ||
|
||
func pprofDo(ctx context.Context, labels pprof.LabelSet, fn func(context.Context)) { | ||
pprof.Do(ctx, labels, fn) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
//go:build gluon_pprof_disabled | ||
|
||
package logging | ||
|
||
import ( | ||
"context" | ||
"runtime/pprof" | ||
) | ||
|
||
func pprofDo(ctx context.Context, labels pprof.LabelSet, fn func(context.Context)) { | ||
fn(ctx) | ||
} |