Skip to content

Logger refactor: pluggable logger [WIP] - #6

Closed
EmilianoSanchez wants to merge 4 commits into
logger_refactor_baselinefrom
logger_support_message_codes
Closed

Logger refactor: pluggable logger [WIP]#6
EmilianoSanchez wants to merge 4 commits into
logger_refactor_baselinefrom
logger_support_message_codes

Conversation

@EmilianoSanchez

@EmilianoSanchez EmilianoSanchez commented Mar 4, 2021

Copy link
Copy Markdown
Contributor

Javascript commons library

Changes:

  • String constants were replaced with number codes, to support pluggable loggers for size reduction.
    • In case the log level is dynamically changed (via factory.Logger.setLogLevel method or initialState in local storage) and the provided Logger is not "compatible" with that log level, the logger will log the message code number anyway.
  • Pluggable logger validator logs an error instead of throwing one if the provided debug object is not valid. It is done this way for consistency with the builtin logger validator, which logs en error if the provided debug value is not a valid string or boolean value.

To discuss:

  • should we log a warning if dynamically changing the log level to a lower one that the one provided at settings? (e.g.: '[WARN]: lowering the log level from the one initially provided results in some logs without detailed description`).
  • should we support boolean and string types for debug config anyway, but warning about the no detailed log messages?

@EmilianoSanchez
EmilianoSanchez changed the base branch from logger_inject to logger_builtin_and_pluggable March 9, 2021 19:12
@EmilianoSanchez EmilianoSanchez changed the title Logger refactor: support message codes [WIP] Logger refactor: pluggable logger [WIP] Mar 11, 2021
@EmilianoSanchez
EmilianoSanchez changed the base branch from logger_builtin_and_pluggable to logger_refactor_baseline March 16, 2021 20:17
@EmilianoSanchez

Copy link
Copy Markdown
Contributor Author

Duplicated: #12

@EmilianoSanchez
EmilianoSanchez deleted the logger_support_message_codes branch May 20, 2022 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant