You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Default output params in src/output_kind.ml are stored as functions default_level_fun and default_special_fun, and are referenced to by default_level and default_special.
The intention here is that src/mebi_api.ml can re-define default_level and default_special as specified by the user using set_output_level and set_out_special respectively.
In the new src/logger.ml we can now use the functor Logger.Make in any of the files that we wish to output messages from -- this allows per-file logging configuration for the programmer, which is intended to be further refined/configured by the user.
Issue
Since the user configuration comes after compilation, the loggers made by Logger.Make will already be hard-coded with whatever defaults are in src/output_kind.ml, effectively removing the ability for user configuration.
Proposed Solution
Rework the functor Make in src/output_mode.ml to take references to the configured functions in src/output_kind.ml, rather than the functions themselves.
Overview
src/output_kind.mlare stored as functionsdefault_level_funanddefault_special_fun, and are referenced to bydefault_levelanddefault_special.src/mebi_api.mlcan re-definedefault_levelanddefault_specialas specified by the user usingset_output_levelandset_out_specialrespectively.src/logger.mlwe can now use the functorLogger.Makein any of the files that we wish to output messages from -- this allows per-file logging configuration for the programmer, which is intended to be further refined/configured by the user.Issue
Logger.Makewill already be hard-coded with whatever defaults are insrc/output_kind.ml, effectively removing the ability for user configuration.Proposed Solution
Makeinsrc/output_mode.mlto take references to the configured functions insrc/output_kind.ml, rather than the functions themselves.