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
Currently we access console directly. Let users provide a logger instead.
The FeatureAppManager and FeatureServiceRegistry need to accept an optional logger through their constructor options. This option must also be added to the createFeatureHub options.
To let Feature Services and Apps log through common infrastructure, we will provide a new Feature Service named LoggerService. This new Feature Service automatically prefixes consumer logs with consumer UIDs. The underlaying logger is provided via a Feature Service factory.
Both loggers need to implement the same interface defined in Core. We also provide a ConsoleLogger implementing this interface for easy adaption.
Tasks
evaluate common loggers and pick a Logger interface
pino and bunyan define the levels/methods trace, debug, info, warn, error, and fatal
log4js defines the levels ALL, MARK, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, and OFF
console has the methods debug, error, info, log, trace, and warn (among others like time etc.)
npm defines the levels silent, error, warn, notice, http, timing, info, verbose, and silly
RFC 5424 defines the levels emerg, alert, crit, error, warning, notice, info, and debug
Currently we access
console
directly. Let users provide a logger instead.The
FeatureAppManager
andFeatureServiceRegistry
need to accept an optional logger through their constructor options. This option must also be added to thecreateFeatureHub
options.To let Feature Services and Apps log through common infrastructure, we will provide a new Feature Service named
LoggerService
. This new Feature Service automatically prefixes consumer logs with consumer UIDs. The underlaying logger is provided via a Feature Service factory.Both loggers need to implement the same interface defined in Core. We also provide a
ConsoleLogger
implementing this interface for easy adaption.Tasks
Logger
interfacetrace
,debug
,info
,warn
,error
, andfatal
ALL
,MARK
,TRACE
,DEBUG
,INFO
,WARN
,ERROR
,FATAL
, andOFF
console
has the methodsdebug
,error
,info
,log
,trace
, andwarn
(among others liketime
etc.)silent
,error
,warn
,notice
,http
,timing
,info
,verbose
, andsilly
emerg
,alert
,crit
,error
,warning
,notice
,info
, anddebug
createfeat(core): define Logger interface and add consoleLogger #402ConsoleLogger
in@feature-hub/core
logger
option intoFeatureAppManager
feat(core): add logger option to FeatureAppManager, FeatureServiceRegistry, and createFeatureHub #404logger
option intoFeatureServiceRegistry
feat(core): add logger option to FeatureAppManager, FeatureServiceRegistry, and createFeatureHub #404logger
option intocreateFeatureHub
feat(core): add logger option to FeatureAppManager, FeatureServiceRegistry, and createFeatureHub #404logger
option into@feature-hub/dom
define functions feat(dom): add logger option to defineFeatureAppContainer & defineFeatureAppLoader #406logger
toFeatureHubContextValue
and integrate into@feature-hub/react
FeatureAppLoader
/FeatureAppContainer
feat(react): add custom logger option to FeatureHubContext #408LoggerService
feat(logger): add Logger Feature Service #413LoggerService
inHistoryService
feat(history-service): use Logger Feature Service instead of console #414LoggerService
inAsyncSsrManager
feat(async-ssr-manager): use Logger Feature Service instead of console #415LoggerService
inTodoManager
feat(demos): use Logger Feature Service in Todo Manager #417The text was updated successfully, but these errors were encountered: