File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ type hookCreatorOptions struct {
8989 nvidiaCDIHookPath string
9090 disabledHooks []HookName
9191 enabledHooks []HookName
92+ debugLogging bool
9293}
9394
9495type Option func (* hookCreatorOptions )
@@ -114,6 +115,12 @@ type HookCreator interface {
114115 Create (HookName , ... string ) * Hook
115116}
116117
118+ func WithDebugLogging (debugLogging bool ) Option {
119+ return func (hco * hookCreatorOptions ) {
120+ hco .debugLogging = debugLogging
121+ }
122+ }
123+
117124// WithDisabledHooks explicitly disables the specified hooks.
118125// This can be specified multiple times.
119126func WithDisabledHooks (hooks ... HookName ) Option {
@@ -164,6 +171,7 @@ func NewHookCreator(opts ...Option) HookCreator {
164171 nvidiaCDIHookPath : o .nvidiaCDIHookPath ,
165172 disabledHooks : disabledHooks ,
166173 fixedArgs : getFixedArgsForCDIHookCLI (o .nvidiaCDIHookPath ),
174+ debugLogging : o .debugLogging ,
167175 }
168176
169177 return c
You can’t perform that action at this time.
0 commit comments