Skip to content

MebiApi OutputConfig -- Defaults currently override user-set parameters for message output #42

Description

@thecathe

Overview

  • 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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions