Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to mute the flash-store log, it's really verbose indeed. #98

Open
su-chang opened this issue Feb 17, 2022 · 2 comments
Open

How to mute the flash-store log, it's really verbose indeed. #98

su-chang opened this issue Feb 17, 2022 · 2 comments

Comments

@su-chang
Copy link

The default log level is verbose, if we set brolog level as verbose, it would also effect flash-store.

We want to mute the flash-store log.

17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO PuppetWhatsApp room roomMemberList([email protected])
17:18:01 VERB FlashStore get([email protected])
17:18:01 INFO BotAction syncRoom() room list from wechaty has 36 in total.
17:18:01 INFO BotAction syncRoom() room list from db has 36 in total.
17:18:01 INFO BotAction syncRoom() room list from add has 0 in total.
17:19:02 VERB ConfigManager receive maintain mode heartbeat.
17:19:23 INFO BotAction syncContact(ready=false, forceSync=false)
17:19:23 VERB Contact findAll()
17:19:23 VERB Puppet contactSearch(query=undefined, )
17:19:23 INFO PuppetWhatsApp contact contactList()
17:19:23 VERB FlashStore keys()
17:19:23 VERB FlashStore *entries({})
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
17:19:23 VERB FlashStore get([email protected])
@huan
Copy link
Owner

huan commented Feb 17, 2022

According to the below code:

import { log } from 'brolog'

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:

constructor (
public workdir: string,
) {

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.

@su-chang
Copy link
Author

Thanks for you response and advice, I will do it when I'm available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants