withLoggerConfig
Configure logging for dynamic forms.
By default, general logging is enabled (ConsoleLogger) and derivation logging is disabled ('none'). Use this feature to enable derivation debugging.
Presentation
function withLoggerConfig (
config: boolean | (() => boolean) | LoggerConfigOptions = true,
): DynamicFormFeature <"logger">;Returns
Parameters
| Name | Type | Description |
|---|---|---|
| config | boolean | (() => boolean) | | Boolean to enable/disable logging, a function returning boolean, or a config object |
Example usage
// Disable all logging
provideDynamicForm (
...withMaterialFields (),
withLoggerConfig (false)
)
// Enable verbose derivation logging
provideDynamicForm (
...withMaterialFields (),
withLoggerConfig ({ derivations: 'verbose' })
)
// Disable derivation logging but keep general logging
provideDynamicForm (
...withMaterialFields (),
withLoggerConfig ({ derivations: 'none' })
)
// Conditional logging (e.g., only in dev mode)
provideDynamicForm (
...withMaterialFields (),
withLoggerConfig (() => isDevMode())
)