AdguardTeam / AdguardTeam/Scriptlets

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

Ouverte
#492 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
enhancement
Langage dominant
JavaScript
Étoiles
195
Forks
33
Métriques de merge des PR
Aucune PR mergée en 30 j

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.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.