Open su-chang opened 2 years ago
According to the below code:
https://github.com/huan/flash-store/blob/cad208a1a69c1e32511c050167449c5edfc42060/src/config.ts#L1
The FlashStore currently using the global instance log
from Brolog
, which is the same as the Wechaty Puppet system is using.
A solution would be to disable the log for FlashStore by default, add a logger
option in the FlashStoreOptions
, and can pass a Logger
to it to enable the log:
https://github.com/huan/flash-store/blob/cad208a1a69c1e32511c050167449c5edfc42060/src/flash-store.ts#L49-L51
We can use the Logger
interface from Brolog here:
https://github.com/huan/brolog/blob/aa83c0940b9bffe6340d8ae9e4db6a1ad8bb9f07/src/logger.ts#L3
I'd like to accept a PR for implementing the above design.
Thanks for you response and advice, I will do it when I'm available.
The default log level is
verbose
, if we setbrolog
level asverbose
, it would also effectflash-store
.We want to mute the
flash-store
log.