CKLogger

A inheritable and subscribable logger util.

Цей скрипт не слід встановлювати безпосередньо. Це - бібліотека для інших скриптів для включення в мета директиву // @require https://update.greasyfork.org/scripts/441386/1027348/CKLogger.js

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(У мене вже є менеджер скриптів, дайте мені встановити його!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Автор
CKylinMC
Версія
1.0
Створено
12.03.2022
Оновлено
12.03.2022
Size
4,8 кБ
Ліцензія
GPLv3 License

可订阅的多级控制台消息输出工具。

  • 自定义控制台消息提供者, logger.serviceProvider=console
  • 支持log/info/warn/error/debug,支持自定义输出方法
  • 可父子级输出日志, const childLogger = parentLogger.getSubLogger('childname')
  • 可禁用, logger.setVisible(false)
  • 可订阅, logger.subscribe({levels:['error','warn'],onlyVisible:true,includeSubLoggers:true,onlog:(level,namespace,...args)=>{/*do sth here*/}})