Verbosity Control
Verbosity Specification with SciMLLogging.jl
Integrals.jl uses SciMLLogging.jl to provide users with fine-grained control over logging and diagnostic output during integration. The IntegralVerbosity struct allows you to customize which messages are displayed, from deprecation warnings to detailed debugging information about algorithm selection, convergence, and iteration progress.
Basic Usage
Pass an IntegralVerbosity object to solve or init using the verbose keyword argument:
using Integrals
using Integrals: IntegralVerbosity
# Define an integral problem
f(x, p) = x^2 # p is unused but required by the IntegralProblem interface
prob = IntegralProblem(f, 0.0, 1.0)
# Solve with detailed verbosity to see algorithm info and convergence
verbose = IntegralVerbosity(Detailed())
sol = solve(prob, QuadGKJL(), verbose = verbose)
# Solve with completely silent output (no deprecation warnings)
sol = solve(prob, QuadGKJL(), verbose = IntegralVerbosity(None()))
# Solve with default verbosity (only deprecation warnings)
sol = solve(prob, QuadGKJL()) # equivalent to verbose = IntegralVerbosity()API Reference
Integrals.IntegralVerbosity — Type
IntegralVerbosityVerbosity specifier for controlling logging output in Integrals.jl.
Toggles
:cache_init- IntegralCache initialization and setup:domain_transformation- Change of variables for infinite bounds and domain remapping:algorithm_selection- Which algorithm is being used and its parameters:iteration_progress- Per-iteration updates during adaptive integration (can be verbose):convergence_result- Final integration result with value, error estimate, and tolerances:batch_mode- Batch evaluation mode selection:buffer_allocation- Pre-allocated buffer creation for reusable caches:weight_computation- Quadrature weight calculation for sampled integration methods:deprecations- Deprecation warnings for outdated API usage
Presets
IntegralVerbosity supports five predefined SciMLLogging presets:
- None() - No output (best for production)
- Minimal() - Only deprecation warnings
- Standard() - Only deprecation warnings (default, recommended)
- Detailed() - Comprehensive output for debugging (all setup, solver, and debug info)
- All() - Maximum verbosity (includes iteration-by-iteration progress)
Usage
Using Presets
# Standard preset (default) - shows only deprecations
solve(prob, QuadGKJL(); verbose = IntegralVerbosity())
solve(prob, QuadGKJL(); verbose = IntegralVerbosity(Standard()))
# Completely silent
solve(prob, QuadGKJL(); verbose = IntegralVerbosity(None()))
# Only deprecation warnings
solve(prob, QuadGKJL(); verbose = IntegralVerbosity(Minimal()))
# Detailed debugging information
solve(prob, QuadGKJL(); verbose = IntegralVerbosity(Detailed()))
# Maximum verbosity including iteration progress
solve(prob, QuadGKJL(); verbose = IntegralVerbosity(All()))Setting Individual Toggles
# Show only convergence results
solve(prob, QuadGKJL(); verbose = IntegralVerbosity(
cache_init = Silent(),
domain_transformation = Silent(),
algorithm_selection = Silent(),
iteration_progress = Silent(),
convergence_result = InfoLevel(),
batch_mode = Silent(),
buffer_allocation = Silent(),
deprecations = WarnLevel()
))
# Enable iteration-by-iteration progress (useful for slow integrals)
solve(prob, QuadGKJL(); verbose = IntegralVerbosity(iteration_progress = InfoLevel()))Using Groups
# Enable all solver messages (iteration progress + convergence)
solve(prob, QuadGKJL(); verbose = IntegralVerbosity(solver = InfoLevel()))
# Enable all setup messages (cache, domain transforms, algorithm selection)
solve(prob, QuadGKJL(); verbose = IntegralVerbosity(setup = InfoLevel()))
# Enable debug information (batch mode + buffer allocation)
solve(prob, QuadGKJL(); verbose = IntegralVerbosity(debug = DebugLevel()))Preset Details
None
- All toggles:
Silent()
Minimal
deprecations→WarnLevel()(shows deprecation warnings)- All others →
Silent()
Standard (Default)
deprecations→WarnLevel()(shows deprecation warnings)- All others →
Silent()
Detailed
cache_init→InfoLevel()domain_transformation→InfoLevel()algorithm_selection→InfoLevel()convergence_result→InfoLevel()batch_mode→InfoLevel()buffer_allocation→InfoLevel()iteration_progress→Silent()(still off, can be very verbose)deprecations→WarnLevel()
All
- All toggles →
InfoLevel()(includingiteration_progress) deprecations→WarnLevel()