AdguardTeam / AdguardTeam/Scriptlets

Replace "verbose" flag with an option to supply custom Logger implementation

Open
#492 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
195
Forks
33
PR merge metrics
No merged PRs in 30d

Description

Currently, the scriptlets library allows supplying a `verbose` flag that controls whether the scriptlet should write verbose output to the console.

I suggest replacing that flag with the ability to supply custom `Logger` implementation and encapsulate this logic inside.
Something simple like that:

```
interface Logger {
debug()
info()
error()
}
```

This will also require changing the CoreLibs and the extensions content script accordingly.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.