@qubit-ltd/logging 1.4.14 → 1.4.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  <!DOCTYPE html><html lang="en" style="font-size:16px"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Class: Logger</title><!--[if lt IE 9]>
2
2
  <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
3
- <![endif]--><script src="scripts/third-party/hljs.js" defer="defer"></script><script src="scripts/third-party/hljs-line-num.js" defer="defer"></script><script src="scripts/third-party/popper.js" defer="defer"></script><script src="scripts/third-party/tippy.js" defer="defer"></script><script src="scripts/third-party/tocbot.min.js"></script><script>var baseURL="/",locationPathname="";baseURL=(locationPathname=document.location.pathname).substr(0,locationPathname.lastIndexOf("/")+1)</script><link rel="stylesheet" href="styles/clean-jsdoc-theme.min.css"><svg aria-hidden="true" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="display:none"><defs><symbol id="home-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M19 21H5a1 1 0 0 1-1-1v-9H1l10.327-9.388a1 1 0 0 1 1.346 0L23 11h-3v9a1 1 0 0 1-1 1zM6 19h12V9.157l-6-5.454-6 5.454V19z"/></symbol><symbol id="copy-icon" viewbox="0 0 488.3 488.3"><g><path d="M314.25,85.4h-227c-21.3,0-38.6,17.3-38.6,38.6v325.7c0,21.3,17.3,38.6,38.6,38.6h227c21.3,0,38.6-17.3,38.6-38.6V124 C352.75,102.7,335.45,85.4,314.25,85.4z M325.75,449.6c0,6.4-5.2,11.6-11.6,11.6h-227c-6.4,0-11.6-5.2-11.6-11.6V124 c0-6.4,5.2-11.6,11.6-11.6h227c6.4,0,11.6,5.2,11.6,11.6V449.6z"/><path d="M401.05,0h-227c-21.3,0-38.6,17.3-38.6,38.6c0,7.5,6,13.5,13.5,13.5s13.5-6,13.5-13.5c0-6.4,5.2-11.6,11.6-11.6h227 c6.4,0,11.6,5.2,11.6,11.6v325.7c0,6.4-5.2,11.6-11.6,11.6c-7.5,0-13.5,6-13.5,13.5s6,13.5,13.5,13.5c21.3,0,38.6-17.3,38.6-38.6 V38.6C439.65,17.3,422.35,0,401.05,0z"/></g></symbol><symbol id="search-icon" viewBox="0 0 512 512"><g><g><path d="M225.474,0C101.151,0,0,101.151,0,225.474c0,124.33,101.151,225.474,225.474,225.474 c124.33,0,225.474-101.144,225.474-225.474C450.948,101.151,349.804,0,225.474,0z M225.474,409.323 c-101.373,0-183.848-82.475-183.848-183.848S124.101,41.626,225.474,41.626s183.848,82.475,183.848,183.848 S326.847,409.323,225.474,409.323z"/></g></g><g><g><path d="M505.902,476.472L386.574,357.144c-8.131-8.131-21.299-8.131-29.43,0c-8.131,8.124-8.131,21.306,0,29.43l119.328,119.328 c4.065,4.065,9.387,6.098,14.715,6.098c5.321,0,10.649-2.033,14.715-6.098C514.033,497.778,514.033,484.596,505.902,476.472z"/></g></g></symbol><symbol id="font-size-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M11.246 15H4.754l-2 5H.6L7 4h2l6.4 16h-2.154l-2-5zm-.8-2L8 6.885 5.554 13h4.892zM21 12.535V12h2v8h-2v-.535a4 4 0 1 1 0-6.93zM19 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"/></symbol><symbol id="add-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"/></symbol><symbol id="minus-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M5 11h14v2H5z"/></symbol><symbol id="dark-theme-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M10 7a7 7 0 0 0 12 4.9v.1c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2h.1A6.979 6.979 0 0 0 10 7zm-6 5a8 8 0 0 0 15.062 3.762A9 9 0 0 1 8.238 4.938 7.999 7.999 0 0 0 4 12z"/></symbol><symbol id="light-theme-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 18a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-2a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM11 1h2v3h-2V1zm0 19h2v3h-2v-3zM3.515 4.929l1.414-1.414L7.05 5.636 5.636 7.05 3.515 4.93zM16.95 18.364l1.414-1.414 2.121 2.121-1.414 1.414-2.121-2.121zm2.121-14.85l1.414 1.415-2.121 2.121-1.414-1.414 2.121-2.121zM5.636 16.95l1.414 1.414-2.121 2.121-1.414-1.414 2.121-2.121zM23 11v2h-3v-2h3zM4 11v2H1v-2h3z"/></symbol><symbol id="reset-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M18.537 19.567A9.961 9.961 0 0 1 12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10c0 2.136-.67 4.116-1.81 5.74L17 12h3a8 8 0 1 0-2.46 5.772l.997 1.795z"/></symbol><symbol id="down-icon" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.7803 6.21967C13.0732 6.51256 13.0732 6.98744 12.7803 7.28033L8.53033 11.5303C8.23744 11.8232 7.76256 11.8232 7.46967 11.5303L3.21967 7.28033C2.92678 6.98744 2.92678 6.51256 3.21967 6.21967C3.51256 5.92678 3.98744 5.92678 4.28033 6.21967L8 9.93934L11.7197 6.21967C12.0126 5.92678 12.4874 5.92678 12.7803 6.21967Z"></path></symbol><symbol id="codepen-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M16.5 13.202L13 15.535v3.596L19.197 15 16.5 13.202zM14.697 12L12 10.202 9.303 12 12 13.798 14.697 12zM20 10.869L18.303 12 20 13.131V10.87zM19.197 9L13 4.869v3.596l3.5 2.333L19.197 9zM7.5 10.798L11 8.465V4.869L4.803 9 7.5 10.798zM4.803 15L11 19.131v-3.596l-3.5-2.333L4.803 15zM4 13.131L5.697 12 4 10.869v2.262zM2 9a1 1 0 0 1 .445-.832l9-6a1 1 0 0 1 1.11 0l9 6A1 1 0 0 1 22 9v6a1 1 0 0 1-.445.832l-9 6a1 1 0 0 1-1.11 0l-9-6A1 1 0 0 1 2 15V9z"/></symbol><symbol id="close-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"/></symbol><symbol id="menu-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M3 4h18v2H3V4zm0 7h18v2H3v-2zm0 7h18v2H3v-2z"/></symbol></defs></svg></head><body data-theme="dark"><div class="sidebar-container"><div class="sidebar" id="sidebar"><div class="sidebar-items-container"><div class="sidebar-section-title"><a href="index.html" class="sidebar-home-anchor">首页</a></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-类"><div>类</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="Logger.html">Logger</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-全局"><div>全局</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="global.html#FACTORY_DEFAULT_APPENDER">FACTORY_DEFAULT_APPENDER</a></div><div class="sidebar-section-children"><a href="global.html#FACTORY_DEFAULT_LEVEL">FACTORY_DEFAULT_LEVEL</a></div><div class="sidebar-section-children"><a href="global.html#HasLogger">HasLogger</a></div><div class="sidebar-section-children"><a href="global.html#LOGGING_LEVELS">LOGGING_LEVELS</a></div><div class="sidebar-section-children"><a href="global.html#Log">Log</a></div></div></div></div></div><div class="navbar-container" id="VuAckcnZhf"><nav class="navbar"><div class="navbar-left-items"></div><div class="navbar-right-items"><div class="navbar-right-item"><button class="icon-button home-button" aria-label="go-to-homepage"><svg><use xlink:href="#home-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button search-button" aria-label="open-search"><svg><use xlink:href="#search-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button theme-toggle" aria-label="toggle-theme"><svg><use class="theme-svg-use" xlink:href="#light-theme-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button font-size" aria-label="change-font-size"><svg><use xlink:href="#font-size-icon"></use></svg></button></div></div><nav></nav></nav></div><div class="toc-container"><div class="toc-content"><span class="bold">本页内容</span><div id="eed4d2a0bfd64539bb9df78095dec881"></div></div></div><div class="body-wrapper"><div class="main-content"><div class="main-wrapper"><section><header><h1 id="Logger-title" class="has-anchor">Logger</h1><div class="class-description"><p>A simple logging class.</p><p>A <code>Logger</code> object provides the following logging methods:</p><ul><li><code>Logger.trace(message, arg1, arg2, ...)</code>: Outputs a log message with the <code>TRACE</code> level.</li><li><code>Logger.debug(message, arg1, arg2, ...)</code>: Outputs a log message with the <code>DEBUG</code> level.</li><li><code>Logger.info(message, arg1, arg2, ...)</code>: Outputs a log message with the <code>INFO</code> level.</li><li><code>Logger.warn(message, arg1, arg2, ...)</code>: Outputs a log message with the <code>WARN</code> level.</li><li><code>Logger.error(message, arg1, arg2, ...)</code>: Outputs a log message with the <code>ERROR</code> level.</li><li><code>Logger.log(level, message, arg1, arg2, ...)</code>: Outputs a log message with the specified level.</li></ul><p>The message argument of those logging methods supports the following substitution patterns:</p><ul><li><code>%o</code> or <code>%O</code>: Outputs a JavaScript object. Clicking the object name opens more information about it in the inspector.</li><li><code>%d</code> or <code>%i</code>: Outputs an integer. Number formatting is supported, for example <code>logger.info('Foo %.2d', 1.1)</code> will output the number as two significant figures with a leading 0: <code>Foo 01</code>.</li><li><code>%s</code>: Outputs a string.</li><li><code>%f</code>: Outputs a floating-point value. Formatting is supported, for example <code>logger.debug(&quot;Foo %.2f&quot;, 1.1)</code> will output the number to 2 decimal places: <code>Foo 1.10</code>.</li></ul></div></header><article><div class="container-overview"><h2 id="constructor" class="has-anchor">构造函数</h2><h3 class="name has-anchor" id="Logger"><span class="type-signature"></span>new Logger<span class="signature">(name, appender, level)</span></h3><div class="description"><p>Construct a log object.</p><p><strong>NOTE</strong>: Do NOT call this constructor directly. Use the static method <code>Logger.getLogger()</code> instead.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>参数:</strong><table class="params"><thead><tr><th>名称</th><th>类型</th><th class="last">描述</th></tr></thead><tbody><tr><td class="name"><code>name</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>The optional name of this logger. The default value of this argument is an empty string.</p></td></tr><tr><td class="name"><code>appender</code></td><td class="type"><span class="param-type">object</span></td><td class="description last"><p>Optional, indicating the content output pipe of the log. This object must provide <code>trace</code>, <code>debug</code>, <code>info</code>, <code>warn</code> and <code>error</code> methods. The default value of this argument is <code>Logger.getDefaultAppender()</code>.</p></td></tr><tr><td class="name"><code>level</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>Optional, indicating the log level of this object. The default value of this argument is <code>Logger.getDefaultLevel()</code>.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-author bold">作者</dt><dd class="tag-author"><ul><li>Haixing Hu</li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">参见</dt><dd class="tag-see"><ul><li><a href="Logger.html#.getLogger">Logger.getLogger</a></li></ul></dd></div></dl></div><h2 id="methods" class="subsection-title has-anchor">方法</h2><h3 class="name has-anchor" id="disable"><span class="type-signature"></span>disable<span class="signature">()</span></h3><div class="description"><p>Disable this logging object.</p></div><h3 class="name has-anchor" id="enable"><span class="type-signature"></span>enable<span class="signature">()</span></h3><div class="description"><p>Enable this logging object.</p></div><h3 class="name has-anchor" id="getAppender"><span class="type-signature"></span>getAppender<span class="signature">()</span><span class="type-signature"> &rarr; {object}</span></h3><div class="description"><p>Get the appender of this logger.</p></div><div class="method-member-container mt-20"><strong>返回值:</strong><div class="param-desc"><p>The appender of this logger.</p></div><dl class="param-type"><dt>类型:&nbsp;</dt><dd><span class="param-type">object</span></dd></dl></div><h3 class="name has-anchor" id="getLevel"><span class="type-signature"></span>getLevel<span class="signature">()</span><span class="type-signature"> &rarr; {string}</span></h3><div class="description"><p>Get the logging level of this logger.</p></div><div class="method-member-container mt-20"><strong>返回值:</strong><div class="param-desc"><p>The logging level of this logger. Possible return values are <code>TRACE</code>, <code>DEBUG</code>, <code>INFO</code>, <code>WARN</code>, <code>ERROR</code>, and <code>NONE</code>.</p></div><dl class="param-type"><dt>类型:&nbsp;</dt><dd><span class="param-type">string</span></dd></dl></div><h3 class="name has-anchor" id="getName"><span class="type-signature"></span>getName<span class="signature">()</span><span class="type-signature"> &rarr; {string}</span></h3><div class="description"><p>Get the name of this logger.</p></div><div class="method-member-container mt-20"><strong>返回值:</strong><div class="param-desc"><p>The name of this logger.</p></div><dl class="param-type"><dt>类型:&nbsp;</dt><dd><span class="param-type">string</span></dd></dl></div><h3 class="name has-anchor" id="log"><span class="type-signature"></span>log<span class="signature">(level, message, &hellip;args)</span></h3><div class="description"><p>Logs a message in the specified logging level.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>参数:</strong><table class="params"><thead><tr><th>名称</th><th>类型</th><th>特性</th><th class="last">描述</th></tr></thead><tbody><tr><td class="name"><code>level</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes"></td><td class="description last"><p>the logging level.</p></td></tr><tr><td class="name"><code>message</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes"></td><td class="description last"><p>the message or message template, which may contain zero or more substitution patterns, e.g., '%o', '%s', '%d', '%f', ..., etc.</p></td></tr><tr><td class="name"><code>args</code></td><td class="type"><span class="param-type">array</span></td><td class="attributes">&lt;可重复><br></td><td class="description last"><p>the array of arguments used to format the message.</p></td></tr></tbody></table></div><h3 class="name has-anchor" id="setAppender"><span class="type-signature"></span>setAppender<span class="signature">(appender)</span></h3><div class="description"><p>Set up a new Appender.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>参数:</strong><table class="params"><thead><tr><th>名称</th><th>类型</th><th class="last">描述</th></tr></thead><tbody><tr><td class="name"><code>appender</code></td><td class="type"><span class="param-type">object</span></td><td class="description last"><p>The new Appender serves as the content output pipeline of the log. This object must provide <code>trace</code>, <code>debug</code>, <code>info</code>, <code>warn</code> and <code>error</code> methods.</p></td></tr></tbody></table></div><h3 class="name has-anchor" id="setEnabled"><span class="type-signature"></span>setEnabled<span class="signature">(enabled)</span></h3><div class="description"><p>Enable or disable this log object.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>参数:</strong><table class="params"><thead><tr><th>名称</th><th>类型</th><th class="last">描述</th></tr></thead><tbody><tr><td class="name"><code>enabled</code></td><td class="type"><span class="param-type">boolean</span></td><td class="description last"><p>Whether to enable this log object.</p></td></tr></tbody></table></div><h3 class="name has-anchor" id="setLevel"><span class="type-signature"></span>setLevel<span class="signature">(level)</span></h3><div class="description"><p>Set the logging level of this logger.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>参数:</strong><table class="params"><thead><tr><th>名称</th><th>类型</th><th class="last">描述</th></tr></thead><tbody><tr><td class="name"><code>level</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>The new logging level. The allowed levels are <code>TRACE</code>, <code>DEBUG</code>, <code>INFO</code>, <code>WARN</code>, <code>ERROR</code>, and <code>NONE</code>. Lowercase letters are also allowed.</p></td></tr></tbody></table></div><h3 class="name has-anchor" id=".clearAllLoggers"><span class="type-signature">(static) </span>clearAllLoggers<span class="signature">()</span></h3><div class="description"><p>Clears all existing <code>Logger</code> instances.</p></div><h3 class="name has-anchor" id=".getDefaultAppender"><span class="type-signature">(static) </span>getDefaultAppender<span class="signature">()</span><span class="type-signature"> &rarr; {Object}</span></h3><div class="description"><p>Gets the default logging appender.</p><p>The default logging appender is used to construct a new <code>Logger</code> instance if the logging appender of the new instance is not specified.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-see bold">参见</dt><dd class="tag-see"><ul><li><a href="Logger.html#.setDefaultAppender">Logger.setDefaultAppender</a></li><li><a href="Logger.html#.setAllAppenders">Logger.setAllAppenders</a></li><li><a href="Logger.html#.resetAllAppenders">Logger.resetAllAppenders</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>返回值:</strong><div class="param-desc"><p>The default logging appender.</p></div><dl class="param-type"><dt>类型:&nbsp;</dt><dd><span class="param-type">Object</span></dd></dl></div><h3 class="name has-anchor" id=".getDefaultLevel"><span class="type-signature">(static) </span>getDefaultLevel<span class="signature">()</span><span class="type-signature"> &rarr; {string}</span></h3><div class="description"><p>Gets the default logging level.</p><p>The default logging level is used to construct a new <code>Logger</code> instance if the logging level of the new instance is not specified.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-see bold">参见</dt><dd class="tag-see"><ul><li><a href="Logger.html#.setDefaultLevel">Logger.setDefaultLevel</a></li><li><a href="Logger.html#.setAllLevels">Logger.setAllLevels</a></li><li><a href="Logger.html#.resetAllLevels">Logger.resetAllLevels</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>返回值:</strong><div class="param-desc"><p>The global default logging level.</p></div><dl class="param-type"><dt>类型:&nbsp;</dt><dd><span class="param-type">string</span></dd></dl></div><h3 class="name has-anchor" id=".getLogger"><span class="type-signature">(static) </span>getLogger<span class="signature">(name, options)</span><span class="type-signature"> &rarr; {<a href="Logger.html">Logger</a>}</span></h3><div class="description"><p>Gets the <code>Logger</code> instance of the specified name, or constructs a new <code>Logger</code> instance if it does not exist.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>参数:</strong><table class="params"><thead><tr><th>名称</th><th>类型</th><th class="last">描述</th></tr></thead><tbody><tr><td class="name"><code>name</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>The name of the <code>Logger</code> instance to be retrieved.</p></td></tr><tr><td class="name"><code>options</code></td><td class="type"><span class="param-type">Object</span></td><td class="description last"><p>The optional options of the <code>Logger</code> instance to be retrieved. This option object may have the following properties: - <code>appender: object</code>: the specified content output pipe of the log. This object must provide <code>trace</code>, <code>debug</code>, <code>info</code>, <code>warn</code> and <code>error</code> methods. If this option is not provided, the appender of the existing <code>Logger</code> instance will not be changed, and the default appender will be used to construct a new <code>Logger</code> instance if it does not exist. - <code>level: string</code>: the logging level of the <code>Logger</code> instance to be retrieved. The allowed levels are <code>TRACE</code>, <code>DEBUG</code>, <code>INFO</code>, <code>WARN</code>, <code>ERROR</code>, and <code>NONE</code>. Lowercase letters are also allowed. If this option is not provided, the logging level of the existing <code>Logger</code> instance will not be changed, and the default logging level will be used to construct a new <code>Logger</code> instance if it does not exist.</p></td></tr></tbody></table></div><div class="method-member-container mt-20"><strong>返回值:</strong><div class="param-desc"><p>The <code>Logger</code> instance of the specified name, which either be the existing one or a newly constructed one.</p></div><dl class="param-type"><dt>类型:&nbsp;</dt><dd><span class="param-type"><a href="Logger.html">Logger</a></span></dd></dl></div><h3 class="name has-anchor" id=".getLoggerLevel"><span class="type-signature">(static) </span>getLoggerLevel<span class="signature">(name)</span><span class="type-signature"> &rarr; {string}</span></h3><div class="description"><p>Gets the logging level of the <code>Logger</code> instance of the specified name.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>参数:</strong><table class="params"><thead><tr><th>名称</th><th>类型</th><th class="last">描述</th></tr></thead><tbody><tr><td class="name"><code>name</code></td><td class="type"></td><td class="description last"><p>The name of the <code>Logger</code> instance.</p></td></tr></tbody></table></div><div class="method-member-container mt-20"><strong>返回值:</strong><div class="param-desc"><p>The logging level of the <code>Logger</code> instance of the specified name. If the <code>Logger</code> instance of the specified name does not exist, the default logging level will be returned.</p></div><dl class="param-type"><dt>类型:&nbsp;</dt><dd><span class="param-type">string</span></dd></dl></div><h3 class="name has-anchor" id=".reset"><span class="type-signature">(static) </span>reset<span class="signature">()</span></h3><div class="description"><p>Resets all configurations of the <code>Logger</code> class to the factory values.</p><p>This method is equivalent to calling the following methods in sequence:</p><ul><li><code>Logger.clearAllLoggers()</code></li><li><code>Logger.resetDefaultLevel()</code></li><li><code>Logger.resetDefaultAppender()</code></li></ul></div><h3 class="name has-anchor" id=".resetAllAppenders"><span class="type-signature">(static) </span>resetAllAppenders<span class="signature">()</span></h3><div class="description"><p>Sets the appender of all <code>Logger</code> instants to the default appender.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-see bold">参见</dt><dd class="tag-see"><ul><li><a href="Logger.html#.getDefaultAppender">Logger.getDefaultAppender</a></li><li><a href="Logger.html#.setDefaultAppender">Logger.setDefaultAppender</a></li><li><a href="Logger.html#.setAllAppenders">Logger.setAllAppenders</a></li></ul></dd></div></dl><h3 class="name has-anchor" id=".resetAllLevels"><span class="type-signature">(static) </span>resetAllLevels<span class="signature">()</span></h3><div class="description"><p>Sets the logging level of all <code>Logger</code> instants to the default logging level.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-see bold">参见</dt><dd class="tag-see"><ul><li><a href="Logger.html#.getDefaultLevel">Logger.getDefaultLevel</a></li><li><a href="Logger.html#.setDefaultLevel">Logger.setDefaultLevel</a></li><li><a href="Logger.html#.setAllLevels">Logger.setAllLevels</a></li></ul></dd></div></dl><h3 class="name has-anchor" id=".resetDefaultAppender"><span class="type-signature">(static) </span>resetDefaultAppender<span class="signature">()</span></h3><div class="description"><p>Resets the default logging appender to the factory value.</p><p>The default logging appender is used to construct a new <code>Logger</code> instance if the logging appender of the new instance is not specified.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-see bold">参见</dt><dd class="tag-see"><ul><li><a href="Logger.html#.getDefaultAppender">Logger.getDefaultAppender</a></li></ul></dd></div></dl><h3 class="name has-anchor" id=".resetDefaultLevel"><span class="type-signature">(static) </span>resetDefaultLevel<span class="signature">()</span></h3><div class="description"><p>Resets the default logging level to the factory value.</p><p>The default logging level is used to construct a new <code>Logger</code> instance if the logging level of the new instance is not specified.</p></div><h3 class="name has-anchor" id=".setAllAppenders"><span class="type-signature">(static) </span>setAllAppenders<span class="signature">(appender)</span></h3><div class="description"><p>Sets the appender of all <code>Logger</code> instants.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>参数:</strong><table class="params"><thead><tr><th>名称</th><th>类型</th><th class="last">描述</th></tr></thead><tbody><tr><td class="name"><code>appender</code></td><td class="type"><span class="param-type">object</span></td><td class="description last"><p>The new appender to be set, indicating the content output pipe of the log. This object must provide <code>trace</code>, <code>debug</code>, <code>info</code>, <code>warn</code> and <code>error</code> methods.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-see bold">参见</dt><dd class="tag-see"><ul><li><a href="Logger.html#.getDefaultAppender">Logger.getDefaultAppender</a></li><li><a href="Logger.html#.setDefaultAppender">Logger.setDefaultAppender</a></li><li><a href="Logger.html#.resetAllAppenders">Logger.resetAllAppenders</a></li></ul></dd></div></dl><h3 class="name has-anchor" id=".setAllLevels"><span class="type-signature">(static) </span>setAllLevels<span class="signature">(level)</span></h3><div class="description"><p>Sets the logging level of all existing <code>Logger</code> instants.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>参数:</strong><table class="params"><thead><tr><th>名称</th><th>类型</th><th class="last">描述</th></tr></thead><tbody><tr><td class="name"><code>level</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>The new logging level of all existing <code>Logger</code> instants. The allowed levels are <code>TRACE</code>, <code>DEBUG</code>, <code>INFO</code>, <code>WARN</code>, <code>ERROR</code>, and <code>NONE</code>. Lowercase letters are also allowed.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-see bold">参见</dt><dd class="tag-see"><ul><li><a href="Logger.html#.getDefaultLevel">Logger.getDefaultLevel</a></li><li><a href="Logger.html#.setDefaultLevel">Logger.setDefaultLevel</a></li><li><a href="Logger.html#.resetAllLevels">Logger.resetAllLevels</a></li></ul></dd></div></dl><h3 class="name has-anchor" id=".setDefaultAppender"><span class="type-signature">(static) </span>setDefaultAppender<span class="signature">(appender)</span></h3><div class="description"><p>Sets the default logging appender.</p><p>The default logging appender is used to construct a new <code>Logger</code> instance if the logging appender of the new instance is not specified.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>参数:</strong><table class="params"><thead><tr><th>名称</th><th>类型</th><th class="last">描述</th></tr></thead><tbody><tr><td class="name"><code>appender</code></td><td class="type"><span class="param-type">object</span></td><td class="description last"><p>The new default logging appender.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-see bold">参见</dt><dd class="tag-see"><ul><li><a href="Logger.html#.getDefaultAppender">Logger.getDefaultAppender</a></li><li><a href="Logger.html#.setAllAppenders">Logger.setAllAppenders</a></li><li><a href="Logger.html#.resetAllAppenders">Logger.resetAllAppenders</a></li></ul></dd></div></dl><h3 class="name has-anchor" id=".setDefaultLevel"><span class="type-signature">(static) </span>setDefaultLevel<span class="signature">(level)</span></h3><div class="description"><p>Sets the default logging level.</p><p>The default logging level is used to construct a new <code>Logger</code> instance if the logging level of the new instance is not specified.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>参数:</strong><table class="params"><thead><tr><th>名称</th><th>类型</th><th class="last">描述</th></tr></thead><tbody><tr><td class="name"><code>level</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>The new default logging level. The allowed levels are <code>TRACE</code>, <code>DEBUG</code>, <code>INFO</code>, <code>WARN</code>, <code>ERROR</code>, and <code>NONE</code>. Lowercase letters are also allowed.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-see bold">参见</dt><dd class="tag-see"><ul><li><a href="Logger.html#.getDefaultLevel">Logger.getDefaultLevel</a></li><li><a href="Logger.html#.setAllLevels">Logger.setAllLevels</a></li><li><a href="Logger.html#.resetAllLevels">Logger.resetAllLevels</a></li></ul></dd></div></dl><h3 class="name has-anchor" id=".setLoggerLevel"><span class="type-signature">(static) </span>setLoggerLevel<span class="signature">(name, level)</span></h3><div class="description"><p>Sets the logging level of the <code>Logger</code> instance of the specified name.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>参数:</strong><table class="params"><thead><tr><th>名称</th><th>类型</th><th class="last">描述</th></tr></thead><tbody><tr><td class="name"><code>name</code></td><td class="type"></td><td class="description last"><p>The name of the <code>Logger</code> instance.</p></td></tr><tr><td class="name"><code>level</code></td><td class="type"></td><td class="description last"><p>The new logging level of the <code>Logger</code> instance of the specified name. The allowed levels are <code>TRACE</code>, <code>DEBUG</code>, <code>INFO</code>, <code>WARN</code>, <code>ERROR</code>, and <code>NONE</code>. Lowercase letters are also allowed.</p></td></tr></tbody></table></div></article></section></div></div></div><div class="search-container" id="PkfLWpAbet" style="display:none"><div class="wrapper" id="iCxFxjkHbP"><button class="icon-button search-close-button" id="VjLlGakifb" aria-label="关闭搜索"><svg><use xlink:href="#close-icon"></use></svg></button><div class="search-box-c"><svg><use xlink:href="#search-icon"></use></svg> <input type="text" id="vpcKVYIppa" class="search-input" placeholder="搜索..." autofocus></div><div class="search-result-c" id="fWwVHRuDuN"><span class="search-result-c-text">输入任何内容查看搜索结果</span></div></div></div><div class="mobile-menu-icon-container"><button class="icon-button" id="mobile-menu" data-isopen="false" aria-label="menu"><svg><use xlink:href="#menu-icon"></use></svg></button></div><div id="mobile-sidebar" class="mobile-sidebar-container"><div class="mobile-sidebar-wrapper"><div class="mobile-nav-links"></div><div class="mobile-sidebar-items-c"><div class="sidebar-section-title"><a href="index.html" class="sidebar-home-anchor">首页</a></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-类"><div>类</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="Logger.html">Logger</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-全局"><div>全局</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="global.html#FACTORY_DEFAULT_APPENDER">FACTORY_DEFAULT_APPENDER</a></div><div class="sidebar-section-children"><a href="global.html#FACTORY_DEFAULT_LEVEL">FACTORY_DEFAULT_LEVEL</a></div><div class="sidebar-section-children"><a href="global.html#HasLogger">HasLogger</a></div><div class="sidebar-section-children"><a href="global.html#LOGGING_LEVELS">LOGGING_LEVELS</a></div><div class="sidebar-section-children"><a href="global.html#Log">Log</a></div></div></div><div class="mobile-navbar-actions"><div class="navbar-right-item"><button class="icon-button home-button" aria-label="go-to-homepage"><svg><use xlink:href="#home-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button search-button" aria-label="open-search"><svg><use xlink:href="#search-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button theme-toggle" aria-label="toggle-theme"><svg><use class="theme-svg-use" xlink:href="#light-theme-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button font-size" aria-label="change-font-size"><svg><use xlink:href="#font-size-icon"></use></svg></button></div></div></div></div><script type="text/javascript" src="scripts/core.min.js"></script><script src="scripts/search.min.js" defer="defer"></script><script src="scripts/third-party/fuse.js" defer="defer"></script><script type="text/javascript">var tocbotInstance=tocbot.init({tocSelector:"#eed4d2a0bfd64539bb9df78095dec881",contentSelector:".main-content",headingSelector:"h1, h2, h3",hasInnerContainers:!0,scrollContainer:".main-content",headingsOffset:130,onClick:bringLinkToView})</script><script>document.addEventListener("DOMContentLoaded",(function(){"undefined"!=typeof tippy&&(tippy(".home-button",{content:"回到首页",delay:500}),tippy(".theme-toggle",{content:"切换主题",delay:500}),tippy(".search-button",{content:"搜索",delay:500}),tippy(".font-size",{content:"更改字体大小",delay:500}))}))</script></body></html>
3
+ <![endif]--><script src="scripts/third-party/hljs.js" defer="defer"></script><script src="scripts/third-party/hljs-line-num.js" defer="defer"></script><script src="scripts/third-party/popper.js" defer="defer"></script><script src="scripts/third-party/tippy.js" defer="defer"></script><script src="scripts/third-party/tocbot.min.js"></script><script>var baseURL="/",locationPathname="";baseURL=(locationPathname=document.location.pathname).substr(0,locationPathname.lastIndexOf("/")+1)</script><link rel="stylesheet" href="styles/clean-jsdoc-theme.min.css"><svg aria-hidden="true" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="display:none"><defs><symbol id="home-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M19 21H5a1 1 0 0 1-1-1v-9H1l10.327-9.388a1 1 0 0 1 1.346 0L23 11h-3v9a1 1 0 0 1-1 1zM6 19h12V9.157l-6-5.454-6 5.454V19z"/></symbol><symbol id="copy-icon" viewbox="0 0 488.3 488.3"><g><path d="M314.25,85.4h-227c-21.3,0-38.6,17.3-38.6,38.6v325.7c0,21.3,17.3,38.6,38.6,38.6h227c21.3,0,38.6-17.3,38.6-38.6V124 C352.75,102.7,335.45,85.4,314.25,85.4z M325.75,449.6c0,6.4-5.2,11.6-11.6,11.6h-227c-6.4,0-11.6-5.2-11.6-11.6V124 c0-6.4,5.2-11.6,11.6-11.6h227c6.4,0,11.6,5.2,11.6,11.6V449.6z"/><path d="M401.05,0h-227c-21.3,0-38.6,17.3-38.6,38.6c0,7.5,6,13.5,13.5,13.5s13.5-6,13.5-13.5c0-6.4,5.2-11.6,11.6-11.6h227 c6.4,0,11.6,5.2,11.6,11.6v325.7c0,6.4-5.2,11.6-11.6,11.6c-7.5,0-13.5,6-13.5,13.5s6,13.5,13.5,13.5c21.3,0,38.6-17.3,38.6-38.6 V38.6C439.65,17.3,422.35,0,401.05,0z"/></g></symbol><symbol id="search-icon" viewBox="0 0 512 512"><g><g><path d="M225.474,0C101.151,0,0,101.151,0,225.474c0,124.33,101.151,225.474,225.474,225.474 c124.33,0,225.474-101.144,225.474-225.474C450.948,101.151,349.804,0,225.474,0z M225.474,409.323 c-101.373,0-183.848-82.475-183.848-183.848S124.101,41.626,225.474,41.626s183.848,82.475,183.848,183.848 S326.847,409.323,225.474,409.323z"/></g></g><g><g><path d="M505.902,476.472L386.574,357.144c-8.131-8.131-21.299-8.131-29.43,0c-8.131,8.124-8.131,21.306,0,29.43l119.328,119.328 c4.065,4.065,9.387,6.098,14.715,6.098c5.321,0,10.649-2.033,14.715-6.098C514.033,497.778,514.033,484.596,505.902,476.472z"/></g></g></symbol><symbol id="font-size-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M11.246 15H4.754l-2 5H.6L7 4h2l6.4 16h-2.154l-2-5zm-.8-2L8 6.885 5.554 13h4.892zM21 12.535V12h2v8h-2v-.535a4 4 0 1 1 0-6.93zM19 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"/></symbol><symbol id="add-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"/></symbol><symbol id="minus-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M5 11h14v2H5z"/></symbol><symbol id="dark-theme-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M10 7a7 7 0 0 0 12 4.9v.1c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2h.1A6.979 6.979 0 0 0 10 7zm-6 5a8 8 0 0 0 15.062 3.762A9 9 0 0 1 8.238 4.938 7.999 7.999 0 0 0 4 12z"/></symbol><symbol id="light-theme-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 18a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-2a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM11 1h2v3h-2V1zm0 19h2v3h-2v-3zM3.515 4.929l1.414-1.414L7.05 5.636 5.636 7.05 3.515 4.93zM16.95 18.364l1.414-1.414 2.121 2.121-1.414 1.414-2.121-2.121zm2.121-14.85l1.414 1.415-2.121 2.121-1.414-1.414 2.121-2.121zM5.636 16.95l1.414 1.414-2.121 2.121-1.414-1.414 2.121-2.121zM23 11v2h-3v-2h3zM4 11v2H1v-2h3z"/></symbol><symbol id="reset-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M18.537 19.567A9.961 9.961 0 0 1 12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10c0 2.136-.67 4.116-1.81 5.74L17 12h3a8 8 0 1 0-2.46 5.772l.997 1.795z"/></symbol><symbol id="down-icon" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.7803 6.21967C13.0732 6.51256 13.0732 6.98744 12.7803 7.28033L8.53033 11.5303C8.23744 11.8232 7.76256 11.8232 7.46967 11.5303L3.21967 7.28033C2.92678 6.98744 2.92678 6.51256 3.21967 6.21967C3.51256 5.92678 3.98744 5.92678 4.28033 6.21967L8 9.93934L11.7197 6.21967C12.0126 5.92678 12.4874 5.92678 12.7803 6.21967Z"></path></symbol><symbol id="codepen-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M16.5 13.202L13 15.535v3.596L19.197 15 16.5 13.202zM14.697 12L12 10.202 9.303 12 12 13.798 14.697 12zM20 10.869L18.303 12 20 13.131V10.87zM19.197 9L13 4.869v3.596l3.5 2.333L19.197 9zM7.5 10.798L11 8.465V4.869L4.803 9 7.5 10.798zM4.803 15L11 19.131v-3.596l-3.5-2.333L4.803 15zM4 13.131L5.697 12 4 10.869v2.262zM2 9a1 1 0 0 1 .445-.832l9-6a1 1 0 0 1 1.11 0l9 6A1 1 0 0 1 22 9v6a1 1 0 0 1-.445.832l-9 6a1 1 0 0 1-1.11 0l-9-6A1 1 0 0 1 2 15V9z"/></symbol><symbol id="close-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"/></symbol><symbol id="menu-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M3 4h18v2H3V4zm0 7h18v2H3v-2zm0 7h18v2H3v-2z"/></symbol></defs></svg></head><body data-theme="dark"><div class="sidebar-container"><div class="sidebar" id="sidebar"><div class="sidebar-items-container"><div class="sidebar-section-title"><a href="index.html" class="sidebar-home-anchor">首页</a></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-类"><div>类</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="Logger.html">Logger</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-全局"><div>全局</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="global.html#FACTORY_DEFAULT_APPENDER">FACTORY_DEFAULT_APPENDER</a></div><div class="sidebar-section-children"><a href="global.html#FACTORY_DEFAULT_LEVEL">FACTORY_DEFAULT_LEVEL</a></div><div class="sidebar-section-children"><a href="global.html#HasLogger">HasLogger</a></div><div class="sidebar-section-children"><a href="global.html#LOGGING_LEVELS">LOGGING_LEVELS</a></div><div class="sidebar-section-children"><a href="global.html#Log">Log</a></div></div></div></div></div><div class="navbar-container" id="VuAckcnZhf"><nav class="navbar"><div class="navbar-left-items"></div><div class="navbar-right-items"><div class="navbar-right-item"><button class="icon-button home-button" aria-label="go-to-homepage"><svg><use xlink:href="#home-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button search-button" aria-label="open-search"><svg><use xlink:href="#search-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button theme-toggle" aria-label="toggle-theme"><svg><use class="theme-svg-use" xlink:href="#light-theme-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button font-size" aria-label="change-font-size"><svg><use xlink:href="#font-size-icon"></use></svg></button></div></div><nav></nav></nav></div><div class="toc-container"><div class="toc-content"><span class="bold">本页内容</span><div id="eed4d2a0bfd64539bb9df78095dec881"></div></div></div><div class="body-wrapper"><div class="main-content"><div class="main-wrapper"><section><header><h1 id="Logger-title" class="has-anchor">Logger</h1><div class="class-description"><p>A simple logging class.</p><p>A <code>Logger</code> object provides the following logging methods:</p><ul><li><code>Logger.trace(message, arg1, arg2, ...)</code>: Outputs a log message with the <code>TRACE</code> level.</li><li><code>Logger.debug(message, arg1, arg2, ...)</code>: Outputs a log message with the <code>DEBUG</code> level.</li><li><code>Logger.info(message, arg1, arg2, ...)</code>: Outputs a log message with the <code>INFO</code> level.</li><li><code>Logger.warn(message, arg1, arg2, ...)</code>: Outputs a log message with the <code>WARN</code> level.</li><li><code>Logger.error(message, arg1, arg2, ...)</code>: Outputs a log message with the <code>ERROR</code> level.</li><li><code>Logger.log(level, message, arg1, arg2, ...)</code>: Outputs a log message with the specified level.</li></ul><p>The message argument of those logging methods supports the following substitution patterns:</p><ul><li><code>%o</code> or <code>%O</code>: Outputs a JavaScript object. Clicking the object name opens more information about it in the inspector.</li><li><code>%d</code> or <code>%i</code>: Outputs an integer. Number formatting is supported, for example <code>logger.info('Foo %.2d', 1.1)</code> will output the number as two significant figures with a leading 0: <code>Foo 01</code>.</li><li><code>%s</code>: Outputs a string.</li><li><code>%f</code>: Outputs a floating-point value. Formatting is supported, for example <code>logger.debug(&quot;Foo %.2f&quot;, 1.1)</code> will output the number to 2 decimal places: <code>Foo 1.10</code>.</li></ul></div></header><article><div class="container-overview"><h2 id="constructor" class="has-anchor">构造函数</h2><h3 class="name has-anchor" id="Logger"><span class="type-signature"></span>new Logger<span class="signature">(name, appender, level)</span></h3><div class="description"><p>Construct a log object.</p><p><strong>NOTE</strong>: Do NOT call this constructor directly. Use the static method <code>Logger.getLogger()</code> instead.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>参数:</strong><table class="params"><thead><tr><th>名称</th><th>类型</th><th class="last">描述</th></tr></thead><tbody><tr><td class="name"><code>name</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>The optional name of this logger. The default value of this argument is an empty string.</p></td></tr><tr><td class="name"><code>appender</code></td><td class="type"><span class="param-type">object</span></td><td class="description last"><p>Optional, indicating the content output pipe of the log. This object must provide <code>trace</code>, <code>debug</code>, <code>info</code>, <code>warn</code> and <code>error</code> methods. The default value of this argument is <code>Logger.getDefaultAppender()</code>.</p></td></tr><tr><td class="name"><code>level</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>Optional, indicating the log level of this object. The default value of this argument is <code>Logger.getDefaultLevel()</code>.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-author bold">作者</dt><dd class="tag-author"><ul><li>Haixing Hu</li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">参见</dt><dd class="tag-see"><ul><li><a href="Logger.html#.getLogger">Logger.getLogger</a></li></ul></dd></div></dl></div><h2 id="methods" class="subsection-title has-anchor">方法</h2><h3 class="name has-anchor" id="disable"><span class="type-signature"></span>disable<span class="signature">()</span></h3><div class="description"><p>Disable this logging object.</p></div><h3 class="name has-anchor" id="enable"><span class="type-signature"></span>enable<span class="signature">()</span></h3><div class="description"><p>Enable this logging object.</p></div><h3 class="name has-anchor" id="getAppender"><span class="type-signature"></span>getAppender<span class="signature">()</span><span class="type-signature"> &rarr; {object}</span></h3><div class="description"><p>Get the appender of this logger.</p></div><div class="method-member-container mt-20"><strong>返回值:</strong><div class="param-desc"><p>The appender of this logger.</p></div><dl class="param-type"><dt>类型:&nbsp;</dt><dd><span class="param-type">object</span></dd></dl></div><h3 class="name has-anchor" id="getLevel"><span class="type-signature"></span>getLevel<span class="signature">()</span><span class="type-signature"> &rarr; {string}</span></h3><div class="description"><p>Get the logging level of this logger.</p></div><div class="method-member-container mt-20"><strong>返回值:</strong><div class="param-desc"><p>The logging level of this logger. Possible return values are <code>TRACE</code>, <code>DEBUG</code>, <code>INFO</code>, <code>WARN</code>, <code>ERROR</code>, and <code>NONE</code>.</p></div><dl class="param-type"><dt>类型:&nbsp;</dt><dd><span class="param-type">string</span></dd></dl></div><h3 class="name has-anchor" id="getName"><span class="type-signature"></span>getName<span class="signature">()</span><span class="type-signature"> &rarr; {string}</span></h3><div class="description"><p>Get the name of this logger.</p></div><div class="method-member-container mt-20"><strong>返回值:</strong><div class="param-desc"><p>The name of this logger.</p></div><dl class="param-type"><dt>类型:&nbsp;</dt><dd><span class="param-type">string</span></dd></dl></div><h3 class="name has-anchor" id="log"><span class="type-signature"></span>log<span class="signature">(level, message, &hellip;args)</span></h3><div class="description"><p>Logs a message in the specified logging level.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>参数:</strong><table class="params"><thead><tr><th>名称</th><th>类型</th><th>特性</th><th class="last">描述</th></tr></thead><tbody><tr><td class="name"><code>level</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes"></td><td class="description last"><p>the logging level.</p></td></tr><tr><td class="name"><code>message</code></td><td class="type"><span class="param-type">string</span></td><td class="attributes"></td><td class="description last"><p>the message or message template, which may contain zero or more substitution patterns, e.g., '%o', '%s', '%d', '%f', ..., etc.</p></td></tr><tr><td class="name"><code>args</code></td><td class="type"><span class="param-type">array</span></td><td class="attributes">&lt;可重复><br></td><td class="description last"><p>the array of arguments used to format the message.</p></td></tr></tbody></table></div><h3 class="name has-anchor" id="setAppender"><span class="type-signature"></span>setAppender<span class="signature">(appender)</span></h3><div class="description"><p>Set up a new Appender.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>参数:</strong><table class="params"><thead><tr><th>名称</th><th>类型</th><th class="last">描述</th></tr></thead><tbody><tr><td class="name"><code>appender</code></td><td class="type"><span class="param-type">object</span></td><td class="description last"><p>The new Appender serves as the content output pipeline of the log. This object must provide <code>trace</code>, <code>debug</code>, <code>info</code>, <code>warn</code> and <code>error</code> methods.</p></td></tr></tbody></table></div><h3 class="name has-anchor" id="setEnabled"><span class="type-signature"></span>setEnabled<span class="signature">(enabled)</span></h3><div class="description"><p>Enable or disable this log object.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>参数:</strong><table class="params"><thead><tr><th>名称</th><th>类型</th><th class="last">描述</th></tr></thead><tbody><tr><td class="name"><code>enabled</code></td><td class="type"><span class="param-type">boolean</span></td><td class="description last"><p>Whether to enable this log object.</p></td></tr></tbody></table></div><h3 class="name has-anchor" id="setLevel"><span class="type-signature"></span>setLevel<span class="signature">(level)</span></h3><div class="description"><p>Set the logging level of this logger.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>参数:</strong><table class="params"><thead><tr><th>名称</th><th>类型</th><th class="last">描述</th></tr></thead><tbody><tr><td class="name"><code>level</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>The new logging level. The allowed levels are <code>TRACE</code>, <code>DEBUG</code>, <code>INFO</code>, <code>WARN</code>, <code>ERROR</code>, and <code>NONE</code>. Lowercase letters are also allowed.</p></td></tr></tbody></table></div><h3 class="name has-anchor" id=".clearAllLoggers"><span class="type-signature">(static) </span>clearAllLoggers<span class="signature">()</span></h3><div class="description"><p>Clears all existing <code>Logger</code> instances.</p></div><h3 class="name has-anchor" id=".getDefaultAppender"><span class="type-signature">(static) </span>getDefaultAppender<span class="signature">()</span><span class="type-signature"> &rarr; {Object}</span></h3><div class="description"><p>Gets the default logging appender.</p><p>The default logging appender is used to construct a new <code>Logger</code> instance if the logging appender of the new instance is not specified.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-see bold">参见</dt><dd class="tag-see"><ul><li><a href="Logger.html#.setDefaultAppender">Logger.setDefaultAppender</a></li><li><a href="Logger.html#.setAllAppenders">Logger.setAllAppenders</a></li><li><a href="Logger.html#.resetAllAppenders">Logger.resetAllAppenders</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>返回值:</strong><div class="param-desc"><p>The default logging appender.</p></div><dl class="param-type"><dt>类型:&nbsp;</dt><dd><span class="param-type">Object</span></dd></dl></div><h3 class="name has-anchor" id=".getDefaultLevel"><span class="type-signature">(static) </span>getDefaultLevel<span class="signature">()</span><span class="type-signature"> &rarr; {string}</span></h3><div class="description"><p>Gets the default logging level.</p><p>The default logging level is used to construct a new <code>Logger</code> instance if the logging level of the new instance is not specified.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-see bold">参见</dt><dd class="tag-see"><ul><li><a href="Logger.html#.setDefaultLevel">Logger.setDefaultLevel</a></li><li><a href="Logger.html#.setAllLevels">Logger.setAllLevels</a></li><li><a href="Logger.html#.resetAllLevels">Logger.resetAllLevels</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>返回值:</strong><div class="param-desc"><p>The global default logging level.</p></div><dl class="param-type"><dt>类型:&nbsp;</dt><dd><span class="param-type">string</span></dd></dl></div><h3 class="name has-anchor" id=".getLogger"><span class="type-signature">(static) </span>getLogger<span class="signature">(name, options)</span><span class="type-signature"> &rarr; {<a href="Logger.html">Logger</a>}</span></h3><div class="description"><p>Gets the <code>Logger</code> instance of the specified name, or constructs a new <code>Logger</code> instance if it does not exist.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>参数:</strong><table class="params"><thead><tr><th>名称</th><th>类型</th><th class="last">描述</th></tr></thead><tbody><tr><td class="name"><code>name</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>The name of the <code>Logger</code> instance to be retrieved.</p></td></tr><tr><td class="name"><code>options</code></td><td class="type"><span class="param-type">Object</span></td><td class="description last"><p>The optional options of the <code>Logger</code> instance to be retrieved. This option object may have the following properties: - <code>appender: object</code>: the specified content output pipe of the log. This object must provide <code>trace</code>, <code>debug</code>, <code>info</code>, <code>warn</code> and <code>error</code> methods. If this option is not provided, the appender of the existing <code>Logger</code> instance will not be changed, and the default appender will be used to construct a new <code>Logger</code> instance if it does not exist. - <code>level: string</code>: the logging level of the <code>Logger</code> instance to be retrieved. The allowed levels are <code>TRACE</code>, <code>DEBUG</code>, <code>INFO</code>, <code>WARN</code>, <code>ERROR</code>, and <code>NONE</code>. Lowercase letters are also allowed. If this option is not provided, the logging level of the existing <code>Logger</code> instance will not be changed, and the default logging level will be used to construct a new <code>Logger</code> instance if it does not exist.</p></td></tr></tbody></table></div><div class="method-member-container mt-20"><strong>返回值:</strong><div class="param-desc"><p>The <code>Logger</code> instance of the specified name, which either be the existing one or a newly constructed one.</p></div><dl class="param-type"><dt>类型:&nbsp;</dt><dd><span class="param-type"><a href="Logger.html">Logger</a></span></dd></dl></div><h3 class="name has-anchor" id=".getLoggerLevel"><span class="type-signature">(static) </span>getLoggerLevel<span class="signature">(name)</span><span class="type-signature"> &rarr; {string}</span></h3><div class="description"><p>Gets the logging level of the <code>Logger</code> instance of the specified name.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>参数:</strong><table class="params"><thead><tr><th>名称</th><th>类型</th><th class="last">描述</th></tr></thead><tbody><tr><td class="name"><code>name</code></td><td class="type"></td><td class="description last"><p>The name of the <code>Logger</code> instance.</p></td></tr></tbody></table></div><div class="method-member-container mt-20"><strong>返回值:</strong><div class="param-desc"><p>The logging level of the <code>Logger</code> instance of the specified name. If the <code>Logger</code> instance of the specified name does not exist, the default logging level will be returned.</p></div><dl class="param-type"><dt>类型:&nbsp;</dt><dd><span class="param-type">string</span></dd></dl></div><h3 class="name has-anchor" id=".reset"><span class="type-signature">(static) </span>reset<span class="signature">()</span></h3><div class="description"><p>Resets all configurations of the <code>Logger</code> class to the factory values.</p><p>This method is equivalent to calling the following methods in sequence:</p><ul><li><code>Logger.clearAllLoggers()</code></li><li><code>Logger.resetDefaultLevel()</code></li><li><code>Logger.resetDefaultAppender()</code></li></ul></div><h3 class="name has-anchor" id=".resetAllAppenders"><span class="type-signature">(static) </span>resetAllAppenders<span class="signature">()</span></h3><div class="description"><p>Sets the appender of all <code>Logger</code> instants to the default appender.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-see bold">参见</dt><dd class="tag-see"><ul><li><a href="Logger.html#.getDefaultAppender">Logger.getDefaultAppender</a></li><li><a href="Logger.html#.setDefaultAppender">Logger.setDefaultAppender</a></li><li><a href="Logger.html#.setAllAppenders">Logger.setAllAppenders</a></li></ul></dd></div></dl><h3 class="name has-anchor" id=".resetAllLevels"><span class="type-signature">(static) </span>resetAllLevels<span class="signature">()</span></h3><div class="description"><p>Sets the logging level of all <code>Logger</code> instants to the default logging level.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-see bold">参见</dt><dd class="tag-see"><ul><li><a href="Logger.html#.getDefaultLevel">Logger.getDefaultLevel</a></li><li><a href="Logger.html#.setDefaultLevel">Logger.setDefaultLevel</a></li><li><a href="Logger.html#.setAllLevels">Logger.setAllLevels</a></li></ul></dd></div></dl><h3 class="name has-anchor" id=".resetDefaultAppender"><span class="type-signature">(static) </span>resetDefaultAppender<span class="signature">()</span></h3><div class="description"><p>Resets the default logging appender to the factory value.</p><p>The default logging appender is used to construct a new <code>Logger</code> instance if the logging appender of the new instance is not specified.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-see bold">参见</dt><dd class="tag-see"><ul><li><a href="Logger.html#.getDefaultAppender">Logger.getDefaultAppender</a></li></ul></dd></div></dl><h3 class="name has-anchor" id=".resetDefaultLevel"><span class="type-signature">(static) </span>resetDefaultLevel<span class="signature">()</span></h3><div class="description"><p>Resets the default logging level to the factory value.</p><p>The default logging level is used to construct a new <code>Logger</code> instance if the logging level of the new instance is not specified.</p></div><h3 class="name has-anchor" id=".setAllAppenders"><span class="type-signature">(static) </span>setAllAppenders<span class="signature">(appender)</span></h3><div class="description"><p>Sets the appender of all <code>Logger</code> instants.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>参数:</strong><table class="params"><thead><tr><th>名称</th><th>类型</th><th class="last">描述</th></tr></thead><tbody><tr><td class="name"><code>appender</code></td><td class="type"><span class="param-type">object</span></td><td class="description last"><p>The new appender to be set, indicating the content output pipe of the log. This object must provide <code>trace</code>, <code>debug</code>, <code>info</code>, <code>warn</code> and <code>error</code> methods.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-see bold">参见</dt><dd class="tag-see"><ul><li><a href="Logger.html#.getDefaultAppender">Logger.getDefaultAppender</a></li><li><a href="Logger.html#.setDefaultAppender">Logger.setDefaultAppender</a></li><li><a href="Logger.html#.resetAllAppenders">Logger.resetAllAppenders</a></li></ul></dd></div></dl><h3 class="name has-anchor" id=".setAllLevels"><span class="type-signature">(static) </span>setAllLevels<span class="signature">(level)</span></h3><div class="description"><p>Sets the logging level of all existing <code>Logger</code> instants.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>参数:</strong><table class="params"><thead><tr><th>名称</th><th>类型</th><th class="last">描述</th></tr></thead><tbody><tr><td class="name"><code>level</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>The new logging level of all existing <code>Logger</code> instants. The allowed levels are <code>TRACE</code>, <code>DEBUG</code>, <code>INFO</code>, <code>WARN</code>, <code>ERROR</code>, and <code>NONE</code>. Lowercase letters are also allowed.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-see bold">参见</dt><dd class="tag-see"><ul><li><a href="Logger.html#.getDefaultLevel">Logger.getDefaultLevel</a></li><li><a href="Logger.html#.setDefaultLevel">Logger.setDefaultLevel</a></li><li><a href="Logger.html#.resetAllLevels">Logger.resetAllLevels</a></li></ul></dd></div></dl><h3 class="name has-anchor" id=".setDefaultAppender"><span class="type-signature">(static) </span>setDefaultAppender<span class="signature">(appender)</span></h3><div class="description"><p>Sets the default logging appender.</p><p>The default logging appender is used to construct a new <code>Logger</code> instance if the logging appender of the new instance is not specified.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>参数:</strong><table class="params"><thead><tr><th>名称</th><th>类型</th><th class="last">描述</th></tr></thead><tbody><tr><td class="name"><code>appender</code></td><td class="type"><span class="param-type">object</span></td><td class="description last"><p>The new default logging appender.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-see bold">参见</dt><dd class="tag-see"><ul><li><a href="Logger.html#.getDefaultAppender">Logger.getDefaultAppender</a></li><li><a href="Logger.html#.setAllAppenders">Logger.setAllAppenders</a></li><li><a href="Logger.html#.resetAllAppenders">Logger.resetAllAppenders</a></li></ul></dd></div></dl><h3 class="name has-anchor" id=".setDefaultLevel"><span class="type-signature">(static) </span>setDefaultLevel<span class="signature">(level)</span></h3><div class="description"><p>Sets the default logging level.</p><p>The default logging level is used to construct a new <code>Logger</code> instance if the logging level of the new instance is not specified.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>参数:</strong><table class="params"><thead><tr><th>名称</th><th>类型</th><th class="last">描述</th></tr></thead><tbody><tr><td class="name"><code>level</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>The new default logging level. The allowed levels are <code>TRACE</code>, <code>DEBUG</code>, <code>INFO</code>, <code>WARN</code>, <code>ERROR</code>, and <code>NONE</code>. Lowercase letters are also allowed.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-see bold">参见</dt><dd class="tag-see"><ul><li><a href="Logger.html#.getDefaultLevel">Logger.getDefaultLevel</a></li><li><a href="Logger.html#.setAllLevels">Logger.setAllLevels</a></li><li><a href="Logger.html#.resetAllLevels">Logger.resetAllLevels</a></li></ul></dd></div></dl><h3 class="name has-anchor" id=".setLoggerLevel"><span class="type-signature">(static) </span>setLoggerLevel<span class="signature">(name, level)</span></h3><div class="description"><p>Sets the logging level of the <code>Logger</code> instance of the specified name.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>参数:</strong><table class="params"><thead><tr><th>名称</th><th>类型</th><th class="last">描述</th></tr></thead><tbody><tr><td class="name"><code>name</code></td><td class="type"></td><td class="description last"><p>The name of the <code>Logger</code> instance.</p></td></tr><tr><td class="name"><code>level</code></td><td class="type"></td><td class="description last"><p>The new logging level of the <code>Logger</code> instance of the specified name. The allowed levels are <code>TRACE</code>, <code>DEBUG</code>, <code>INFO</code>, <code>WARN</code>, <code>ERROR</code>, and <code>NONE</code>. Lowercase letters are also allowed.</p></td></tr></tbody></table></div></article></section></div></div></div><div class="search-container" id="PkfLWpAbet" style="display:none"><div class="wrapper" id="iCxFxjkHbP"><button class="icon-button search-close-button" id="VjLlGakifb" aria-label="关闭搜索"><svg><use xlink:href="#close-icon"></use></svg></button><div class="search-box-c"><svg><use xlink:href="#search-icon"></use></svg> <input type="text" id="vpcKVYIppa" class="search-input" placeholder="搜索..." autofocus></div><div class="search-result-c" id="fWwVHRuDuN"><span class="search-result-c-text">输入任何内容查看搜索结果</span></div></div></div><div class="mobile-menu-icon-container"><button class="icon-button" id="mobile-menu" data-isopen="false" aria-label="menu"><svg><use xlink:href="#menu-icon"></use></svg></button></div><div id="mobile-sidebar" class="mobile-sidebar-container"><div class="mobile-sidebar-wrapper"><div class="mobile-nav-links"></div><div class="mobile-sidebar-items-c"><div class="sidebar-section-title"><a href="index.html" class="sidebar-home-anchor">首页</a></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-类"><div>类</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="Logger.html">Logger</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-全局"><div>全局</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="global.html#FACTORY_DEFAULT_APPENDER">FACTORY_DEFAULT_APPENDER</a></div><div class="sidebar-section-children"><a href="global.html#FACTORY_DEFAULT_LEVEL">FACTORY_DEFAULT_LEVEL</a></div><div class="sidebar-section-children"><a href="global.html#HasLogger">HasLogger</a></div><div class="sidebar-section-children"><a href="global.html#LOGGING_LEVELS">LOGGING_LEVELS</a></div><div class="sidebar-section-children"><a href="global.html#Log">Log</a></div></div></div><div class="mobile-navbar-actions"><div class="navbar-right-item"><button class="icon-button home-button" aria-label="go-to-homepage"><svg><use xlink:href="#home-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button search-button" aria-label="open-search"><svg><use xlink:href="#search-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button theme-toggle" aria-label="toggle-theme"><svg><use class="theme-svg-use" xlink:href="#light-theme-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button font-size" aria-label="change-font-size"><svg><use xlink:href="#font-size-icon"></use></svg></button></div></div></div></div><script type="text/javascript" src="scripts/core.min.js"></script><script src="scripts/search.min.js" defer="defer"></script><script src="scripts/third-party/fuse.js" defer="defer"></script><script type="text/javascript">var tocbotInstance=tocbot.init({tocSelector:"#eed4d2a0bfd64539bb9df78095dec881",contentSelector:".main-content",headingSelector:"h1, h2, h3",hasInnerContainers:!0,scrollContainer:".main-content",headingsOffset:130,onClick:bringLinkToView})</script><script>document.addEventListener("DOMContentLoaded",function(){"undefined"!=typeof tippy&&(tippy(".home-button",{content:"回到首页",delay:500}),tippy(".theme-toggle",{content:"切换主题",delay:500}),tippy(".search-button",{content:"搜索",delay:500}),tippy(".font-size",{content:"更改字体大小",delay:500}))})</script></body></html>
@@ -1 +1 @@
1
- {"list":[{"title":"FACTORY_DEFAULT_APPENDER","link":"<a href=\"global.html#FACTORY_DEFAULT_APPENDER\">FACTORY_DEFAULT_APPENDER</a>","description":"<p>The factory value of the Logger class's default log appender, which is\nthe standard output pipe of the console.</p>"},{"title":"FACTORY_DEFAULT_LEVEL","link":"<a href=\"global.html#FACTORY_DEFAULT_LEVEL\">FACTORY_DEFAULT_LEVEL</a>","description":"<p>The factory value of the Logger class's default logging level,\nwhich is <code>DEBUG</code>.</p>"},{"title":"HasLogger","link":"<a href=\"global.html#HasLogger\">HasLogger</a>","description":"<p>A decorator to add a named logger to a class.</p>\n<p>This decorator will add a named logger to the class, which can be accessed\nvia the <code>logger</code> property of the class.</p>\n<p>Example usage:</p>\n<pre class=\"prettyprint source lang-js\"><code>import { HasLogger } from '@haixing_hu/logging';\n\n&#064;HasLogger\nclass MyClass {\n foo() {\n this.logger.debug('This is MyClass.foo()');\n }\n}\n</code></pre>\n<p>The following is another example usage with the class component of Vue.js:</p>\n<pre class=\"prettyprint source lang-js\"><code>import { Component, toVue } from '@haixing_hu/vue3-class-component';\nimport { HasLogger, Log } from '@haixing_hu/logging';\n\n&#064;Component({\n template: '&lt;p &#064;click=&quot;foo&quot;>{{ message }}&lt;/p>',\n})\n&#064;HasLogger\nclass MyComponent {\n &#064;Log\n foo() {\n this.logger.debug('This is MyComponent.foo()');\n }\n}\n\nexport default toVue(MyComponent);\n</code></pre>\n<p><strong>NOTE</strong>: the order of the decorators is IMPORTANT. The <code>@HasLogger</code> decorator\nmust be placed <strong>AFTER</strong> the <code>@Component</code> decorator.</p>"},{"title":"LOGGING_LEVELS","link":"<a href=\"global.html#LOGGING_LEVELS\">LOGGING_LEVELS</a>","description":"<p>Predefined logging levels.</p>"},{"title":"Log","link":"<a href=\"global.html#Log\">Log</a>","description":"<p>Defines a class method decorator that modifies the target method and prints\nits calling signature in the log, including class name, method name and\nparameters.</p>\n<p>Note that only non-constructor class method can be decorated by this decorator.\nThe global function and class constructor CANNOT be decorated by this decorator.</p>\n<p>Usage example:</p>\n<pre class=\"prettyprint source lang-js\"><code>import { Log } from '@haixing_hu/logging';\n\nclass Person {\n &#064;Log\n eat(meal) {\n ...\n }\n}\n\nconst person = new Person();\nconst meal = new Meal();\nperson.eat(meal); // 日志中将会打印此方法调用的签名\n</code></pre>"},{"title":"Logger","link":"<a href=\"Logger.html\">Logger</a>","description":"<p>Construct a log object.</p>\n<p><strong>NOTE</strong>: Do NOT call this constructor directly. Use the static method\n<code>Logger.getLogger()</code> instead.</p>"},{"title":"Logger#disable","link":"<a href=\"Logger.html#disable\">disable</a>","description":"<p>Disable this logging object.</p>"},{"title":"Logger#enable","link":"<a href=\"Logger.html#enable\">enable</a>","description":"<p>Enable this logging object.</p>"},{"title":"Logger#getAppender","link":"<a href=\"Logger.html#getAppender\">getAppender</a>","description":"<p>Get the appender of this logger.</p>"},{"title":"Logger#getLevel","link":"<a href=\"Logger.html#getLevel\">getLevel</a>","description":"<p>Get the logging level of this logger.</p>"},{"title":"Logger#getName","link":"<a href=\"Logger.html#getName\">getName</a>","description":"<p>Get the name of this logger.</p>"},{"title":"Logger#log","link":"<a href=\"Logger.html#log\">log</a>","description":"<p>Logs a message in the specified logging level.</p>"},{"title":"Logger#setAppender","link":"<a href=\"Logger.html#setAppender\">setAppender</a>","description":"<p>Set up a new Appender.</p>"},{"title":"Logger#setEnabled","link":"<a href=\"Logger.html#setEnabled\">setEnabled</a>","description":"<p>Enable or disable this log object.</p>"},{"title":"Logger#setLevel","link":"<a href=\"Logger.html#setLevel\">setLevel</a>","description":"<p>Set the logging level of this logger.</p>"},{"title":"Logger.clearAllLoggers","link":"<a href=\"Logger.html#.clearAllLoggers\">clearAllLoggers</a>","description":"<p>Clears all existing <code>Logger</code> instances.</p>"},{"title":"Logger.getDefaultAppender","link":"<a href=\"Logger.html#.getDefaultAppender\">getDefaultAppender</a>","description":"<p>Gets the default logging appender.</p>\n<p>The default logging appender is used to construct a new <code>Logger</code> instance\nif the logging appender of the new instance is not specified.</p>"},{"title":"Logger.getDefaultLevel","link":"<a href=\"Logger.html#.getDefaultLevel\">getDefaultLevel</a>","description":"<p>Gets the default logging level.</p>\n<p>The default logging level is used to construct a new <code>Logger</code> instance if\nthe logging level of the new instance is not specified.</p>"},{"title":"Logger.getLogger","link":"<a href=\"Logger.html#.getLogger\">getLogger</a>","description":"<p>Gets the <code>Logger</code> instance of the specified name, or constructs a new\n<code>Logger</code> instance if it does not exist.</p>"},{"title":"Logger.getLoggerLevel","link":"<a href=\"Logger.html#.getLoggerLevel\">getLoggerLevel</a>","description":"<p>Gets the logging level of the <code>Logger</code> instance of the specified name.</p>"},{"title":"Logger.reset","link":"<a href=\"Logger.html#.reset\">reset</a>","description":"<p>Resets all configurations of the <code>Logger</code> class to the factory values.</p>\n<p>This method is equivalent to calling the following methods in sequence:</p>\n<ul>\n<li><code>Logger.clearAllLoggers()</code></li>\n<li><code>Logger.resetDefaultLevel()</code></li>\n<li><code>Logger.resetDefaultAppender()</code></li>\n</ul>"},{"title":"Logger.resetAllAppenders","link":"<a href=\"Logger.html#.resetAllAppenders\">resetAllAppenders</a>","description":"<p>Sets the appender of all <code>Logger</code> instants to the default appender.</p>"},{"title":"Logger.resetAllLevels","link":"<a href=\"Logger.html#.resetAllLevels\">resetAllLevels</a>","description":"<p>Sets the logging level of all <code>Logger</code> instants to the default logging level.</p>"},{"title":"Logger.resetDefaultAppender","link":"<a href=\"Logger.html#.resetDefaultAppender\">resetDefaultAppender</a>","description":"<p>Resets the default logging appender to the factory value.</p>\n<p>The default logging appender is used to construct a new <code>Logger</code> instance\nif the logging appender of the new instance is not specified.</p>"},{"title":"Logger.resetDefaultLevel","link":"<a href=\"Logger.html#.resetDefaultLevel\">resetDefaultLevel</a>","description":"<p>Resets the default logging level to the factory value.</p>\n<p>The default logging level is used to construct a new <code>Logger</code> instance if\nthe logging level of the new instance is not specified.</p>"},{"title":"Logger.setAllAppenders","link":"<a href=\"Logger.html#.setAllAppenders\">setAllAppenders</a>","description":"<p>Sets the appender of all <code>Logger</code> instants.</p>"},{"title":"Logger.setAllLevels","link":"<a href=\"Logger.html#.setAllLevels\">setAllLevels</a>","description":"<p>Sets the logging level of all existing <code>Logger</code> instants.</p>"},{"title":"Logger.setDefaultAppender","link":"<a href=\"Logger.html#.setDefaultAppender\">setDefaultAppender</a>","description":"<p>Sets the default logging appender.</p>\n<p>The default logging appender is used to construct a new <code>Logger</code> instance\nif the logging appender of the new instance is not specified.</p>"},{"title":"Logger.setDefaultLevel","link":"<a href=\"Logger.html#.setDefaultLevel\">setDefaultLevel</a>","description":"<p>Sets the default logging level.</p>\n<p>The default logging level is used to construct a new <code>Logger</code> instance if\nthe logging level of the new instance is not specified.</p>"},{"title":"Logger.setLoggerLevel","link":"<a href=\"Logger.html#.setLoggerLevel\">setLoggerLevel</a>","description":"<p>Sets the logging level of the <code>Logger</code> instance of the specified name.</p>"}]}
1
+ {"list":[{"title":"FACTORY_DEFAULT_APPENDER","link":"<a href=\"global.html#FACTORY_DEFAULT_APPENDER\">FACTORY_DEFAULT_APPENDER</a>","description":"<p>The factory value of the Logger class's default log appender, which is\nthe standard output pipe of the console.</p>"},{"title":"FACTORY_DEFAULT_LEVEL","link":"<a href=\"global.html#FACTORY_DEFAULT_LEVEL\">FACTORY_DEFAULT_LEVEL</a>","description":"<p>The factory value of the Logger class's default logging level,\nwhich is <code>DEBUG</code>.</p>"},{"title":"HasLogger","link":"<a href=\"global.html#HasLogger\">HasLogger</a>","description":"<p>A decorator to add a named logger to a class.</p>\n<p>This decorator will add a named logger to the class, which can be accessed\nvia the <code>logger</code> property of the class.</p>\n<p>Example usage:</p>\n<pre class=\"prettyprint source lang-js\"><code>import { HasLogger } from '@qubit-ltd/logging';\n\n&#064;HasLogger\nclass MyClass {\n foo() {\n this.logger.debug('This is MyClass.foo()');\n }\n}\n</code></pre>\n<p>The following is another example usage with the class component of Vue.js:</p>\n<pre class=\"prettyprint source lang-js\"><code>import { Component, toVue } from '@qubit-ltd/vue3-class-component';\nimport { HasLogger, Log } from '@qubit-ltd/logging';\n\n&#064;Component({\n template: '&lt;p &#064;click=&quot;foo&quot;>{{ message }}&lt;/p>',\n})\n&#064;HasLogger\nclass MyComponent {\n &#064;Log\n foo() {\n this.logger.debug('This is MyComponent.foo()');\n }\n}\n\nexport default toVue(MyComponent);\n</code></pre>\n<p><strong>NOTE</strong>: the order of the decorators is IMPORTANT. The <code>@HasLogger</code> decorator\nmust be placed <strong>AFTER</strong> the <code>@Component</code> decorator.</p>"},{"title":"LOGGING_LEVELS","link":"<a href=\"global.html#LOGGING_LEVELS\">LOGGING_LEVELS</a>","description":"<p>Predefined logging levels.</p>"},{"title":"Log","link":"<a href=\"global.html#Log\">Log</a>","description":"<p>Defines a class method decorator that modifies the target method and prints\nits calling signature in the log, including class name, method name and\nparameters.</p>\n<p>Note that only non-constructor class method can be decorated by this decorator.\nThe global function and class constructor CANNOT be decorated by this decorator.</p>\n<p>Usage example:</p>\n<pre class=\"prettyprint source lang-js\"><code>import { Log } from '@qubit-ltd/logging';\n\nclass Person {\n &#064;Log\n eat(meal) {\n ...\n }\n}\n\nconst person = new Person();\nconst meal = new Meal();\nperson.eat(meal); // 日志中将会打印此方法调用的签名\n</code></pre>"},{"title":"Logger","link":"<a href=\"Logger.html\">Logger</a>","description":"<p>Construct a log object.</p>\n<p><strong>NOTE</strong>: Do NOT call this constructor directly. Use the static method\n<code>Logger.getLogger()</code> instead.</p>"},{"title":"Logger#disable","link":"<a href=\"Logger.html#disable\">disable</a>","description":"<p>Disable this logging object.</p>"},{"title":"Logger#enable","link":"<a href=\"Logger.html#enable\">enable</a>","description":"<p>Enable this logging object.</p>"},{"title":"Logger#getAppender","link":"<a href=\"Logger.html#getAppender\">getAppender</a>","description":"<p>Get the appender of this logger.</p>"},{"title":"Logger#getLevel","link":"<a href=\"Logger.html#getLevel\">getLevel</a>","description":"<p>Get the logging level of this logger.</p>"},{"title":"Logger#getName","link":"<a href=\"Logger.html#getName\">getName</a>","description":"<p>Get the name of this logger.</p>"},{"title":"Logger#log","link":"<a href=\"Logger.html#log\">log</a>","description":"<p>Logs a message in the specified logging level.</p>"},{"title":"Logger#setAppender","link":"<a href=\"Logger.html#setAppender\">setAppender</a>","description":"<p>Set up a new Appender.</p>"},{"title":"Logger#setEnabled","link":"<a href=\"Logger.html#setEnabled\">setEnabled</a>","description":"<p>Enable or disable this log object.</p>"},{"title":"Logger#setLevel","link":"<a href=\"Logger.html#setLevel\">setLevel</a>","description":"<p>Set the logging level of this logger.</p>"},{"title":"Logger.clearAllLoggers","link":"<a href=\"Logger.html#.clearAllLoggers\">clearAllLoggers</a>","description":"<p>Clears all existing <code>Logger</code> instances.</p>"},{"title":"Logger.getDefaultAppender","link":"<a href=\"Logger.html#.getDefaultAppender\">getDefaultAppender</a>","description":"<p>Gets the default logging appender.</p>\n<p>The default logging appender is used to construct a new <code>Logger</code> instance\nif the logging appender of the new instance is not specified.</p>"},{"title":"Logger.getDefaultLevel","link":"<a href=\"Logger.html#.getDefaultLevel\">getDefaultLevel</a>","description":"<p>Gets the default logging level.</p>\n<p>The default logging level is used to construct a new <code>Logger</code> instance if\nthe logging level of the new instance is not specified.</p>"},{"title":"Logger.getLogger","link":"<a href=\"Logger.html#.getLogger\">getLogger</a>","description":"<p>Gets the <code>Logger</code> instance of the specified name, or constructs a new\n<code>Logger</code> instance if it does not exist.</p>"},{"title":"Logger.getLoggerLevel","link":"<a href=\"Logger.html#.getLoggerLevel\">getLoggerLevel</a>","description":"<p>Gets the logging level of the <code>Logger</code> instance of the specified name.</p>"},{"title":"Logger.reset","link":"<a href=\"Logger.html#.reset\">reset</a>","description":"<p>Resets all configurations of the <code>Logger</code> class to the factory values.</p>\n<p>This method is equivalent to calling the following methods in sequence:</p>\n<ul>\n<li><code>Logger.clearAllLoggers()</code></li>\n<li><code>Logger.resetDefaultLevel()</code></li>\n<li><code>Logger.resetDefaultAppender()</code></li>\n</ul>"},{"title":"Logger.resetAllAppenders","link":"<a href=\"Logger.html#.resetAllAppenders\">resetAllAppenders</a>","description":"<p>Sets the appender of all <code>Logger</code> instants to the default appender.</p>"},{"title":"Logger.resetAllLevels","link":"<a href=\"Logger.html#.resetAllLevels\">resetAllLevels</a>","description":"<p>Sets the logging level of all <code>Logger</code> instants to the default logging level.</p>"},{"title":"Logger.resetDefaultAppender","link":"<a href=\"Logger.html#.resetDefaultAppender\">resetDefaultAppender</a>","description":"<p>Resets the default logging appender to the factory value.</p>\n<p>The default logging appender is used to construct a new <code>Logger</code> instance\nif the logging appender of the new instance is not specified.</p>"},{"title":"Logger.resetDefaultLevel","link":"<a href=\"Logger.html#.resetDefaultLevel\">resetDefaultLevel</a>","description":"<p>Resets the default logging level to the factory value.</p>\n<p>The default logging level is used to construct a new <code>Logger</code> instance if\nthe logging level of the new instance is not specified.</p>"},{"title":"Logger.setAllAppenders","link":"<a href=\"Logger.html#.setAllAppenders\">setAllAppenders</a>","description":"<p>Sets the appender of all <code>Logger</code> instants.</p>"},{"title":"Logger.setAllLevels","link":"<a href=\"Logger.html#.setAllLevels\">setAllLevels</a>","description":"<p>Sets the logging level of all existing <code>Logger</code> instants.</p>"},{"title":"Logger.setDefaultAppender","link":"<a href=\"Logger.html#.setDefaultAppender\">setDefaultAppender</a>","description":"<p>Sets the default logging appender.</p>\n<p>The default logging appender is used to construct a new <code>Logger</code> instance\nif the logging appender of the new instance is not specified.</p>"},{"title":"Logger.setDefaultLevel","link":"<a href=\"Logger.html#.setDefaultLevel\">setDefaultLevel</a>","description":"<p>Sets the default logging level.</p>\n<p>The default logging level is used to construct a new <code>Logger</code> instance if\nthe logging level of the new instance is not specified.</p>"},{"title":"Logger.setLoggerLevel","link":"<a href=\"Logger.html#.setLoggerLevel\">setLoggerLevel</a>","description":"<p>Sets the logging level of the <code>Logger</code> instance of the specified name.</p>"}]}
@@ -1,6 +1,6 @@
1
1
  <!DOCTYPE html><html lang="en" style="font-size:16px"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Global</title><!--[if lt IE 9]>
2
2
  <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
3
- <![endif]--><script src="scripts/third-party/hljs.js" defer="defer"></script><script src="scripts/third-party/hljs-line-num.js" defer="defer"></script><script src="scripts/third-party/popper.js" defer="defer"></script><script src="scripts/third-party/tippy.js" defer="defer"></script><script src="scripts/third-party/tocbot.min.js"></script><script>var baseURL="/",locationPathname="";baseURL=(locationPathname=document.location.pathname).substr(0,locationPathname.lastIndexOf("/")+1)</script><link rel="stylesheet" href="styles/clean-jsdoc-theme.min.css"><svg aria-hidden="true" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="display:none"><defs><symbol id="home-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M19 21H5a1 1 0 0 1-1-1v-9H1l10.327-9.388a1 1 0 0 1 1.346 0L23 11h-3v9a1 1 0 0 1-1 1zM6 19h12V9.157l-6-5.454-6 5.454V19z"/></symbol><symbol id="copy-icon" viewbox="0 0 488.3 488.3"><g><path d="M314.25,85.4h-227c-21.3,0-38.6,17.3-38.6,38.6v325.7c0,21.3,17.3,38.6,38.6,38.6h227c21.3,0,38.6-17.3,38.6-38.6V124 C352.75,102.7,335.45,85.4,314.25,85.4z M325.75,449.6c0,6.4-5.2,11.6-11.6,11.6h-227c-6.4,0-11.6-5.2-11.6-11.6V124 c0-6.4,5.2-11.6,11.6-11.6h227c6.4,0,11.6,5.2,11.6,11.6V449.6z"/><path d="M401.05,0h-227c-21.3,0-38.6,17.3-38.6,38.6c0,7.5,6,13.5,13.5,13.5s13.5-6,13.5-13.5c0-6.4,5.2-11.6,11.6-11.6h227 c6.4,0,11.6,5.2,11.6,11.6v325.7c0,6.4-5.2,11.6-11.6,11.6c-7.5,0-13.5,6-13.5,13.5s6,13.5,13.5,13.5c21.3,0,38.6-17.3,38.6-38.6 V38.6C439.65,17.3,422.35,0,401.05,0z"/></g></symbol><symbol id="search-icon" viewBox="0 0 512 512"><g><g><path d="M225.474,0C101.151,0,0,101.151,0,225.474c0,124.33,101.151,225.474,225.474,225.474 c124.33,0,225.474-101.144,225.474-225.474C450.948,101.151,349.804,0,225.474,0z M225.474,409.323 c-101.373,0-183.848-82.475-183.848-183.848S124.101,41.626,225.474,41.626s183.848,82.475,183.848,183.848 S326.847,409.323,225.474,409.323z"/></g></g><g><g><path d="M505.902,476.472L386.574,357.144c-8.131-8.131-21.299-8.131-29.43,0c-8.131,8.124-8.131,21.306,0,29.43l119.328,119.328 c4.065,4.065,9.387,6.098,14.715,6.098c5.321,0,10.649-2.033,14.715-6.098C514.033,497.778,514.033,484.596,505.902,476.472z"/></g></g></symbol><symbol id="font-size-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M11.246 15H4.754l-2 5H.6L7 4h2l6.4 16h-2.154l-2-5zm-.8-2L8 6.885 5.554 13h4.892zM21 12.535V12h2v8h-2v-.535a4 4 0 1 1 0-6.93zM19 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"/></symbol><symbol id="add-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"/></symbol><symbol id="minus-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M5 11h14v2H5z"/></symbol><symbol id="dark-theme-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M10 7a7 7 0 0 0 12 4.9v.1c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2h.1A6.979 6.979 0 0 0 10 7zm-6 5a8 8 0 0 0 15.062 3.762A9 9 0 0 1 8.238 4.938 7.999 7.999 0 0 0 4 12z"/></symbol><symbol id="light-theme-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 18a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-2a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM11 1h2v3h-2V1zm0 19h2v3h-2v-3zM3.515 4.929l1.414-1.414L7.05 5.636 5.636 7.05 3.515 4.93zM16.95 18.364l1.414-1.414 2.121 2.121-1.414 1.414-2.121-2.121zm2.121-14.85l1.414 1.415-2.121 2.121-1.414-1.414 2.121-2.121zM5.636 16.95l1.414 1.414-2.121 2.121-1.414-1.414 2.121-2.121zM23 11v2h-3v-2h3zM4 11v2H1v-2h3z"/></symbol><symbol id="reset-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M18.537 19.567A9.961 9.961 0 0 1 12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10c0 2.136-.67 4.116-1.81 5.74L17 12h3a8 8 0 1 0-2.46 5.772l.997 1.795z"/></symbol><symbol id="down-icon" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.7803 6.21967C13.0732 6.51256 13.0732 6.98744 12.7803 7.28033L8.53033 11.5303C8.23744 11.8232 7.76256 11.8232 7.46967 11.5303L3.21967 7.28033C2.92678 6.98744 2.92678 6.51256 3.21967 6.21967C3.51256 5.92678 3.98744 5.92678 4.28033 6.21967L8 9.93934L11.7197 6.21967C12.0126 5.92678 12.4874 5.92678 12.7803 6.21967Z"></path></symbol><symbol id="codepen-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M16.5 13.202L13 15.535v3.596L19.197 15 16.5 13.202zM14.697 12L12 10.202 9.303 12 12 13.798 14.697 12zM20 10.869L18.303 12 20 13.131V10.87zM19.197 9L13 4.869v3.596l3.5 2.333L19.197 9zM7.5 10.798L11 8.465V4.869L4.803 9 7.5 10.798zM4.803 15L11 19.131v-3.596l-3.5-2.333L4.803 15zM4 13.131L5.697 12 4 10.869v2.262zM2 9a1 1 0 0 1 .445-.832l9-6a1 1 0 0 1 1.11 0l9 6A1 1 0 0 1 22 9v6a1 1 0 0 1-.445.832l-9 6a1 1 0 0 1-1.11 0l-9-6A1 1 0 0 1 2 15V9z"/></symbol><symbol id="close-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"/></symbol><symbol id="menu-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M3 4h18v2H3V4zm0 7h18v2H3v-2zm0 7h18v2H3v-2z"/></symbol></defs></svg></head><body data-theme="dark"><div class="sidebar-container"><div class="sidebar" id="sidebar"><div class="sidebar-items-container"><div class="sidebar-section-title"><a href="index.html" class="sidebar-home-anchor">首页</a></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-类"><div>类</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="Logger.html">Logger</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-全局"><div>全局</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="global.html#FACTORY_DEFAULT_APPENDER">FACTORY_DEFAULT_APPENDER</a></div><div class="sidebar-section-children"><a href="global.html#FACTORY_DEFAULT_LEVEL">FACTORY_DEFAULT_LEVEL</a></div><div class="sidebar-section-children"><a href="global.html#HasLogger">HasLogger</a></div><div class="sidebar-section-children"><a href="global.html#LOGGING_LEVELS">LOGGING_LEVELS</a></div><div class="sidebar-section-children"><a href="global.html#Log">Log</a></div></div></div></div></div><div class="navbar-container" id="VuAckcnZhf"><nav class="navbar"><div class="navbar-left-items"></div><div class="navbar-right-items"><div class="navbar-right-item"><button class="icon-button home-button" aria-label="go-to-homepage"><svg><use xlink:href="#home-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button search-button" aria-label="open-search"><svg><use xlink:href="#search-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button theme-toggle" aria-label="toggle-theme"><svg><use class="theme-svg-use" xlink:href="#light-theme-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button font-size" aria-label="change-font-size"><svg><use xlink:href="#font-size-icon"></use></svg></button></div></div><nav></nav></nav></div><div class="toc-container"><div class="toc-content"><span class="bold">本页内容</span><div id="eed4d2a0bfd64539bb9df78095dec881"></div></div></div><div class="body-wrapper"><div class="main-content"><div class="main-wrapper"><section><article><div class="container-overview"></div><h2 id="properties" class="subsection-title has-anchor">属性</h2><div class="allow-overflow"><table class="props"><thead><tr><th>名称</th><th>类型</th><th class="last">描述</th></tr></thead><tbody><tr><td class="name"><code>FACTORY_DEFAULT_APPENDER</code></td><td class="type"><span class="param-type">Console</span></td><td class="description last"><p>The factory value of the Logger class's default log appender, which is the standard output pipe of the console.</p></td></tr><tr><td class="name"><code>FACTORY_DEFAULT_LEVEL</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>The factory value of the Logger class's default logging level, which is <code>DEBUG</code>.</p></td></tr><tr><td class="name"><code>LOGGING_LEVELS</code></td><td class="type"></td><td class="description last"><p>Predefined logging levels.</p></td></tr></tbody></table></div><h2 id="methods" class="subsection-title has-anchor">方法</h2><h3 class="name has-anchor" id="HasLogger"><span class="type-signature"></span>HasLogger<span class="signature">(Class, context)</span><span class="type-signature"> &rarr; {function}</span></h3><div class="description"><p>A decorator to add a named logger to a class.</p><p>This decorator will add a named logger to the class, which can be accessed via the <code>logger</code> property of the class.</p><p>Example usage:</p><pre class="prettyprint source lang-js"><code>import { HasLogger } from '@haixing_hu/logging';
3
+ <![endif]--><script src="scripts/third-party/hljs.js" defer="defer"></script><script src="scripts/third-party/hljs-line-num.js" defer="defer"></script><script src="scripts/third-party/popper.js" defer="defer"></script><script src="scripts/third-party/tippy.js" defer="defer"></script><script src="scripts/third-party/tocbot.min.js"></script><script>var baseURL="/",locationPathname="";baseURL=(locationPathname=document.location.pathname).substr(0,locationPathname.lastIndexOf("/")+1)</script><link rel="stylesheet" href="styles/clean-jsdoc-theme.min.css"><svg aria-hidden="true" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="display:none"><defs><symbol id="home-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M19 21H5a1 1 0 0 1-1-1v-9H1l10.327-9.388a1 1 0 0 1 1.346 0L23 11h-3v9a1 1 0 0 1-1 1zM6 19h12V9.157l-6-5.454-6 5.454V19z"/></symbol><symbol id="copy-icon" viewbox="0 0 488.3 488.3"><g><path d="M314.25,85.4h-227c-21.3,0-38.6,17.3-38.6,38.6v325.7c0,21.3,17.3,38.6,38.6,38.6h227c21.3,0,38.6-17.3,38.6-38.6V124 C352.75,102.7,335.45,85.4,314.25,85.4z M325.75,449.6c0,6.4-5.2,11.6-11.6,11.6h-227c-6.4,0-11.6-5.2-11.6-11.6V124 c0-6.4,5.2-11.6,11.6-11.6h227c6.4,0,11.6,5.2,11.6,11.6V449.6z"/><path d="M401.05,0h-227c-21.3,0-38.6,17.3-38.6,38.6c0,7.5,6,13.5,13.5,13.5s13.5-6,13.5-13.5c0-6.4,5.2-11.6,11.6-11.6h227 c6.4,0,11.6,5.2,11.6,11.6v325.7c0,6.4-5.2,11.6-11.6,11.6c-7.5,0-13.5,6-13.5,13.5s6,13.5,13.5,13.5c21.3,0,38.6-17.3,38.6-38.6 V38.6C439.65,17.3,422.35,0,401.05,0z"/></g></symbol><symbol id="search-icon" viewBox="0 0 512 512"><g><g><path d="M225.474,0C101.151,0,0,101.151,0,225.474c0,124.33,101.151,225.474,225.474,225.474 c124.33,0,225.474-101.144,225.474-225.474C450.948,101.151,349.804,0,225.474,0z M225.474,409.323 c-101.373,0-183.848-82.475-183.848-183.848S124.101,41.626,225.474,41.626s183.848,82.475,183.848,183.848 S326.847,409.323,225.474,409.323z"/></g></g><g><g><path d="M505.902,476.472L386.574,357.144c-8.131-8.131-21.299-8.131-29.43,0c-8.131,8.124-8.131,21.306,0,29.43l119.328,119.328 c4.065,4.065,9.387,6.098,14.715,6.098c5.321,0,10.649-2.033,14.715-6.098C514.033,497.778,514.033,484.596,505.902,476.472z"/></g></g></symbol><symbol id="font-size-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M11.246 15H4.754l-2 5H.6L7 4h2l6.4 16h-2.154l-2-5zm-.8-2L8 6.885 5.554 13h4.892zM21 12.535V12h2v8h-2v-.535a4 4 0 1 1 0-6.93zM19 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"/></symbol><symbol id="add-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"/></symbol><symbol id="minus-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M5 11h14v2H5z"/></symbol><symbol id="dark-theme-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M10 7a7 7 0 0 0 12 4.9v.1c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2h.1A6.979 6.979 0 0 0 10 7zm-6 5a8 8 0 0 0 15.062 3.762A9 9 0 0 1 8.238 4.938 7.999 7.999 0 0 0 4 12z"/></symbol><symbol id="light-theme-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 18a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-2a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM11 1h2v3h-2V1zm0 19h2v3h-2v-3zM3.515 4.929l1.414-1.414L7.05 5.636 5.636 7.05 3.515 4.93zM16.95 18.364l1.414-1.414 2.121 2.121-1.414 1.414-2.121-2.121zm2.121-14.85l1.414 1.415-2.121 2.121-1.414-1.414 2.121-2.121zM5.636 16.95l1.414 1.414-2.121 2.121-1.414-1.414 2.121-2.121zM23 11v2h-3v-2h3zM4 11v2H1v-2h3z"/></symbol><symbol id="reset-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M18.537 19.567A9.961 9.961 0 0 1 12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10c0 2.136-.67 4.116-1.81 5.74L17 12h3a8 8 0 1 0-2.46 5.772l.997 1.795z"/></symbol><symbol id="down-icon" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.7803 6.21967C13.0732 6.51256 13.0732 6.98744 12.7803 7.28033L8.53033 11.5303C8.23744 11.8232 7.76256 11.8232 7.46967 11.5303L3.21967 7.28033C2.92678 6.98744 2.92678 6.51256 3.21967 6.21967C3.51256 5.92678 3.98744 5.92678 4.28033 6.21967L8 9.93934L11.7197 6.21967C12.0126 5.92678 12.4874 5.92678 12.7803 6.21967Z"></path></symbol><symbol id="codepen-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M16.5 13.202L13 15.535v3.596L19.197 15 16.5 13.202zM14.697 12L12 10.202 9.303 12 12 13.798 14.697 12zM20 10.869L18.303 12 20 13.131V10.87zM19.197 9L13 4.869v3.596l3.5 2.333L19.197 9zM7.5 10.798L11 8.465V4.869L4.803 9 7.5 10.798zM4.803 15L11 19.131v-3.596l-3.5-2.333L4.803 15zM4 13.131L5.697 12 4 10.869v2.262zM2 9a1 1 0 0 1 .445-.832l9-6a1 1 0 0 1 1.11 0l9 6A1 1 0 0 1 22 9v6a1 1 0 0 1-.445.832l-9 6a1 1 0 0 1-1.11 0l-9-6A1 1 0 0 1 2 15V9z"/></symbol><symbol id="close-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"/></symbol><symbol id="menu-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M3 4h18v2H3V4zm0 7h18v2H3v-2zm0 7h18v2H3v-2z"/></symbol></defs></svg></head><body data-theme="dark"><div class="sidebar-container"><div class="sidebar" id="sidebar"><div class="sidebar-items-container"><div class="sidebar-section-title"><a href="index.html" class="sidebar-home-anchor">首页</a></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-类"><div>类</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="Logger.html">Logger</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-全局"><div>全局</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="global.html#FACTORY_DEFAULT_APPENDER">FACTORY_DEFAULT_APPENDER</a></div><div class="sidebar-section-children"><a href="global.html#FACTORY_DEFAULT_LEVEL">FACTORY_DEFAULT_LEVEL</a></div><div class="sidebar-section-children"><a href="global.html#HasLogger">HasLogger</a></div><div class="sidebar-section-children"><a href="global.html#LOGGING_LEVELS">LOGGING_LEVELS</a></div><div class="sidebar-section-children"><a href="global.html#Log">Log</a></div></div></div></div></div><div class="navbar-container" id="VuAckcnZhf"><nav class="navbar"><div class="navbar-left-items"></div><div class="navbar-right-items"><div class="navbar-right-item"><button class="icon-button home-button" aria-label="go-to-homepage"><svg><use xlink:href="#home-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button search-button" aria-label="open-search"><svg><use xlink:href="#search-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button theme-toggle" aria-label="toggle-theme"><svg><use class="theme-svg-use" xlink:href="#light-theme-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button font-size" aria-label="change-font-size"><svg><use xlink:href="#font-size-icon"></use></svg></button></div></div><nav></nav></nav></div><div class="toc-container"><div class="toc-content"><span class="bold">本页内容</span><div id="eed4d2a0bfd64539bb9df78095dec881"></div></div></div><div class="body-wrapper"><div class="main-content"><div class="main-wrapper"><section><article><div class="container-overview"></div><h2 id="properties" class="subsection-title has-anchor">属性</h2><div class="allow-overflow"><table class="props"><thead><tr><th>名称</th><th>类型</th><th class="last">描述</th></tr></thead><tbody><tr><td class="name"><code>FACTORY_DEFAULT_APPENDER</code></td><td class="type"><span class="param-type">Console</span></td><td class="description last"><p>The factory value of the Logger class's default log appender, which is the standard output pipe of the console.</p></td></tr><tr><td class="name"><code>FACTORY_DEFAULT_LEVEL</code></td><td class="type"><span class="param-type">string</span></td><td class="description last"><p>The factory value of the Logger class's default logging level, which is <code>DEBUG</code>.</p></td></tr><tr><td class="name"><code>LOGGING_LEVELS</code></td><td class="type"></td><td class="description last"><p>Predefined logging levels.</p></td></tr></tbody></table></div><h2 id="methods" class="subsection-title has-anchor">方法</h2><h3 class="name has-anchor" id="HasLogger"><span class="type-signature"></span>HasLogger<span class="signature">(Class, context)</span><span class="type-signature"> &rarr; {function}</span></h3><div class="description"><p>A decorator to add a named logger to a class.</p><p>This decorator will add a named logger to the class, which can be accessed via the <code>logger</code> property of the class.</p><p>Example usage:</p><pre class="prettyprint source lang-js"><code>import { HasLogger } from '@qubit-ltd/logging';
4
4
 
5
5
  &#064;HasLogger
6
6
  class MyClass {
@@ -8,8 +8,8 @@ class MyClass {
8
8
  this.logger.debug('This is MyClass.foo()');
9
9
  }
10
10
  }
11
- </code></pre><p>The following is another example usage with the class component of Vue.js:</p><pre class="prettyprint source lang-js"><code>import { Component, toVue } from '@haixing_hu/vue3-class-component';
12
- import { HasLogger, Log } from '@haixing_hu/logging';
11
+ </code></pre><p>The following is another example usage with the class component of Vue.js:</p><pre class="prettyprint source lang-js"><code>import { Component, toVue } from '@qubit-ltd/vue3-class-component';
12
+ import { HasLogger, Log } from '@qubit-ltd/logging';
13
13
 
14
14
  &#064;Component({
15
15
  template: '&lt;p &#064;click=&quot;foo&quot;>{{ message }}&lt;/p>',
@@ -23,7 +23,7 @@ class MyComponent {
23
23
  }
24
24
 
25
25
  export default toVue(MyComponent);
26
- </code></pre><p><strong>NOTE</strong>: the order of the decorators is IMPORTANT. The <code>@HasLogger</code> decorator must be placed <strong>AFTER</strong> the <code>@Component</code> decorator.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>参数:</strong><table class="params"><thead><tr><th>名称</th><th>类型</th><th class="last">描述</th></tr></thead><tbody><tr><td class="name"><code>Class</code></td><td class="type"><span class="param-type">function</span></td><td class="description last"><p>the target class to be decorated.</p></td></tr><tr><td class="name"><code>context</code></td><td class="type"><span class="param-type">object</span></td><td class="description last"><p>the context object containing information about the class to be decorated.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-author bold">作者</dt><dd class="tag-author"><ul><li>Haixing Hu</li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>返回值:</strong><div class="param-desc"><p>the new constructor of the decorated class.</p></div><dl class="param-type"><dt>类型:&nbsp;</dt><dd><span class="param-type">function</span></dd></dl></div><h3 class="name has-anchor" id="Log"><span class="type-signature"></span>Log<span class="signature">(target, context)</span><span class="type-signature"> &rarr; {function}</span></h3><div class="description"><p>Defines a class method decorator that modifies the target method and prints its calling signature in the log, including class name, method name and parameters.</p><p>Note that only non-constructor class method can be decorated by this decorator. The global function and class constructor CANNOT be decorated by this decorator.</p><p>Usage example:</p><pre class="prettyprint source lang-js"><code>import { Log } from '@haixing_hu/logging';
26
+ </code></pre><p><strong>NOTE</strong>: the order of the decorators is IMPORTANT. The <code>@HasLogger</code> decorator must be placed <strong>AFTER</strong> the <code>@Component</code> decorator.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>参数:</strong><table class="params"><thead><tr><th>名称</th><th>类型</th><th class="last">描述</th></tr></thead><tbody><tr><td class="name"><code>Class</code></td><td class="type"><span class="param-type">function</span></td><td class="description last"><p>the target class to be decorated.</p></td></tr><tr><td class="name"><code>context</code></td><td class="type"><span class="param-type">object</span></td><td class="description last"><p>the context object containing information about the class to be decorated.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-author bold">作者</dt><dd class="tag-author"><ul><li>Haixing Hu</li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>返回值:</strong><div class="param-desc"><p>the new constructor of the decorated class.</p></div><dl class="param-type"><dt>类型:&nbsp;</dt><dd><span class="param-type">function</span></dd></dl></div><h3 class="name has-anchor" id="Log"><span class="type-signature"></span>Log<span class="signature">(target, context)</span><span class="type-signature"> &rarr; {function}</span></h3><div class="description"><p>Defines a class method decorator that modifies the target method and prints its calling signature in the log, including class name, method name and parameters.</p><p>Note that only non-constructor class method can be decorated by this decorator. The global function and class constructor CANNOT be decorated by this decorator.</p><p>Usage example:</p><pre class="prettyprint source lang-js"><code>import { Log } from '@qubit-ltd/logging';
27
27
 
28
28
  class Person {
29
29
  &#064;Log
@@ -35,4 +35,4 @@ class Person {
35
35
  const person = new Person();
36
36
  const meal = new Meal();
37
37
  person.eat(meal); // 日志中将会打印此方法调用的签名
38
- </code></pre></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>参数:</strong><table class="params"><thead><tr><th>名称</th><th>类型</th><th class="last">描述</th></tr></thead><tbody><tr><td class="name"><code>target</code></td><td class="type"><span class="param-type">function</span></td><td class="description last"><p>The method being decorated.</p></td></tr><tr><td class="name"><code>context</code></td><td class="type"><span class="param-type">object</span></td><td class="description last"><p>the context object containing information about the method to be decorated.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-author bold">作者</dt><dd class="tag-author"><ul><li>Haixing Hu</li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>返回值:</strong><div class="param-desc"><p>The decorated method.</p></div><dl class="param-type"><dt>类型:&nbsp;</dt><dd><span class="param-type">function</span></dd></dl></div></article></section></div></div></div><div class="search-container" id="PkfLWpAbet" style="display:none"><div class="wrapper" id="iCxFxjkHbP"><button class="icon-button search-close-button" id="VjLlGakifb" aria-label="关闭搜索"><svg><use xlink:href="#close-icon"></use></svg></button><div class="search-box-c"><svg><use xlink:href="#search-icon"></use></svg> <input type="text" id="vpcKVYIppa" class="search-input" placeholder="搜索..." autofocus></div><div class="search-result-c" id="fWwVHRuDuN"><span class="search-result-c-text">输入任何内容查看搜索结果</span></div></div></div><div class="mobile-menu-icon-container"><button class="icon-button" id="mobile-menu" data-isopen="false" aria-label="menu"><svg><use xlink:href="#menu-icon"></use></svg></button></div><div id="mobile-sidebar" class="mobile-sidebar-container"><div class="mobile-sidebar-wrapper"><div class="mobile-nav-links"></div><div class="mobile-sidebar-items-c"><div class="sidebar-section-title"><a href="index.html" class="sidebar-home-anchor">首页</a></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-类"><div>类</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="Logger.html">Logger</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-全局"><div>全局</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="global.html#FACTORY_DEFAULT_APPENDER">FACTORY_DEFAULT_APPENDER</a></div><div class="sidebar-section-children"><a href="global.html#FACTORY_DEFAULT_LEVEL">FACTORY_DEFAULT_LEVEL</a></div><div class="sidebar-section-children"><a href="global.html#HasLogger">HasLogger</a></div><div class="sidebar-section-children"><a href="global.html#LOGGING_LEVELS">LOGGING_LEVELS</a></div><div class="sidebar-section-children"><a href="global.html#Log">Log</a></div></div></div><div class="mobile-navbar-actions"><div class="navbar-right-item"><button class="icon-button home-button" aria-label="go-to-homepage"><svg><use xlink:href="#home-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button search-button" aria-label="open-search"><svg><use xlink:href="#search-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button theme-toggle" aria-label="toggle-theme"><svg><use class="theme-svg-use" xlink:href="#light-theme-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button font-size" aria-label="change-font-size"><svg><use xlink:href="#font-size-icon"></use></svg></button></div></div></div></div><script type="text/javascript" src="scripts/core.min.js"></script><script src="scripts/search.min.js" defer="defer"></script><script src="scripts/third-party/fuse.js" defer="defer"></script><script type="text/javascript">var tocbotInstance=tocbot.init({tocSelector:"#eed4d2a0bfd64539bb9df78095dec881",contentSelector:".main-content",headingSelector:"h1, h2, h3",hasInnerContainers:!0,scrollContainer:".main-content",headingsOffset:130,onClick:bringLinkToView})</script><script>document.addEventListener("DOMContentLoaded",(function(){"undefined"!=typeof tippy&&(tippy(".home-button",{content:"回到首页",delay:500}),tippy(".theme-toggle",{content:"切换主题",delay:500}),tippy(".search-button",{content:"搜索",delay:500}),tippy(".font-size",{content:"更改字体大小",delay:500}))}))</script></body></html>
38
+ </code></pre></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>参数:</strong><table class="params"><thead><tr><th>名称</th><th>类型</th><th class="last">描述</th></tr></thead><tbody><tr><td class="name"><code>target</code></td><td class="type"><span class="param-type">function</span></td><td class="description last"><p>The method being decorated.</p></td></tr><tr><td class="name"><code>context</code></td><td class="type"><span class="param-type">object</span></td><td class="description last"><p>the context object containing information about the method to be decorated.</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-author bold">作者</dt><dd class="tag-author"><ul><li>Haixing Hu</li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>返回值:</strong><div class="param-desc"><p>The decorated method.</p></div><dl class="param-type"><dt>类型:&nbsp;</dt><dd><span class="param-type">function</span></dd></dl></div></article></section></div></div></div><div class="search-container" id="PkfLWpAbet" style="display:none"><div class="wrapper" id="iCxFxjkHbP"><button class="icon-button search-close-button" id="VjLlGakifb" aria-label="关闭搜索"><svg><use xlink:href="#close-icon"></use></svg></button><div class="search-box-c"><svg><use xlink:href="#search-icon"></use></svg> <input type="text" id="vpcKVYIppa" class="search-input" placeholder="搜索..." autofocus></div><div class="search-result-c" id="fWwVHRuDuN"><span class="search-result-c-text">输入任何内容查看搜索结果</span></div></div></div><div class="mobile-menu-icon-container"><button class="icon-button" id="mobile-menu" data-isopen="false" aria-label="menu"><svg><use xlink:href="#menu-icon"></use></svg></button></div><div id="mobile-sidebar" class="mobile-sidebar-container"><div class="mobile-sidebar-wrapper"><div class="mobile-nav-links"></div><div class="mobile-sidebar-items-c"><div class="sidebar-section-title"><a href="index.html" class="sidebar-home-anchor">首页</a></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-类"><div>类</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="Logger.html">Logger</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-全局"><div>全局</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="global.html#FACTORY_DEFAULT_APPENDER">FACTORY_DEFAULT_APPENDER</a></div><div class="sidebar-section-children"><a href="global.html#FACTORY_DEFAULT_LEVEL">FACTORY_DEFAULT_LEVEL</a></div><div class="sidebar-section-children"><a href="global.html#HasLogger">HasLogger</a></div><div class="sidebar-section-children"><a href="global.html#LOGGING_LEVELS">LOGGING_LEVELS</a></div><div class="sidebar-section-children"><a href="global.html#Log">Log</a></div></div></div><div class="mobile-navbar-actions"><div class="navbar-right-item"><button class="icon-button home-button" aria-label="go-to-homepage"><svg><use xlink:href="#home-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button search-button" aria-label="open-search"><svg><use xlink:href="#search-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button theme-toggle" aria-label="toggle-theme"><svg><use class="theme-svg-use" xlink:href="#light-theme-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button font-size" aria-label="change-font-size"><svg><use xlink:href="#font-size-icon"></use></svg></button></div></div></div></div><script type="text/javascript" src="scripts/core.min.js"></script><script src="scripts/search.min.js" defer="defer"></script><script src="scripts/third-party/fuse.js" defer="defer"></script><script type="text/javascript">var tocbotInstance=tocbot.init({tocSelector:"#eed4d2a0bfd64539bb9df78095dec881",contentSelector:".main-content",headingSelector:"h1, h2, h3",hasInnerContainers:!0,scrollContainer:".main-content",headingsOffset:130,onClick:bringLinkToView})</script><script>document.addEventListener("DOMContentLoaded",function(){"undefined"!=typeof tippy&&(tippy(".home-button",{content:"回到首页",delay:500}),tippy(".theme-toggle",{content:"切换主题",delay:500}),tippy(".search-button",{content:"搜索",delay:500}),tippy(".font-size",{content:"更改字体大小",delay:500}))})</script></body></html>
@@ -241,4 +241,4 @@ yarn test
241
241
 
242
242
  # 构建库
243
243
  yarn build
244
- </code></pre><h2><span id="license">许可证</span></h2><p><a href="https://npmjs.com/package/@qubit-ltd/logging">@qubit-ltd/logging</a> 根据 Apache 2.0 许可证分发。详情请参阅 <a href="LICENSE">LICENSE</a> 文件。</p></article></section></div></div></div><div class="search-container" id="PkfLWpAbet" style="display:none"><div class="wrapper" id="iCxFxjkHbP"><button class="icon-button search-close-button" id="VjLlGakifb" aria-label="关闭搜索"><svg><use xlink:href="#close-icon"></use></svg></button><div class="search-box-c"><svg><use xlink:href="#search-icon"></use></svg> <input type="text" id="vpcKVYIppa" class="search-input" placeholder="搜索..." autofocus></div><div class="search-result-c" id="fWwVHRuDuN"><span class="search-result-c-text">输入任何内容查看搜索结果</span></div></div></div><div class="mobile-menu-icon-container"><button class="icon-button" id="mobile-menu" data-isopen="false" aria-label="menu"><svg><use xlink:href="#menu-icon"></use></svg></button></div><div id="mobile-sidebar" class="mobile-sidebar-container"><div class="mobile-sidebar-wrapper"><div class="mobile-nav-links"></div><div class="mobile-sidebar-items-c"><div class="sidebar-section-title"><a href="index.html" class="sidebar-home-anchor">首页</a></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-类"><div>类</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="Logger.html">Logger</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-全局"><div>全局</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="global.html#FACTORY_DEFAULT_APPENDER">FACTORY_DEFAULT_APPENDER</a></div><div class="sidebar-section-children"><a href="global.html#FACTORY_DEFAULT_LEVEL">FACTORY_DEFAULT_LEVEL</a></div><div class="sidebar-section-children"><a href="global.html#HasLogger">HasLogger</a></div><div class="sidebar-section-children"><a href="global.html#LOGGING_LEVELS">LOGGING_LEVELS</a></div><div class="sidebar-section-children"><a href="global.html#Log">Log</a></div></div></div><div class="mobile-navbar-actions"><div class="navbar-right-item"><button class="icon-button home-button" aria-label="go-to-homepage"><svg><use xlink:href="#home-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button search-button" aria-label="open-search"><svg><use xlink:href="#search-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button theme-toggle" aria-label="toggle-theme"><svg><use class="theme-svg-use" xlink:href="#light-theme-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button font-size" aria-label="change-font-size"><svg><use xlink:href="#font-size-icon"></use></svg></button></div></div></div></div><script type="text/javascript" src="scripts/core.min.js"></script><script src="scripts/search.min.js" defer="defer"></script><script src="scripts/third-party/fuse.js" defer="defer"></script><script type="text/javascript">var tocbotInstance=tocbot.init({tocSelector:"#eed4d2a0bfd64539bb9df78095dec881",contentSelector:".main-content",headingSelector:"h1, h2, h3",hasInnerContainers:!0,scrollContainer:".main-content",headingsOffset:130,onClick:bringLinkToView})</script><script>document.addEventListener("DOMContentLoaded",(function(){"undefined"!=typeof tippy&&(tippy(".home-button",{content:"回到首页",delay:500}),tippy(".theme-toggle",{content:"切换主题",delay:500}),tippy(".search-button",{content:"搜索",delay:500}),tippy(".font-size",{content:"更改字体大小",delay:500}))}))</script></body></html>
244
+ </code></pre><h2><span id="license">许可证</span></h2><p><a href="https://npmjs.com/package/@qubit-ltd/logging">@qubit-ltd/logging</a> 根据 Apache 2.0 许可证分发。详情请参阅 <a href="LICENSE">LICENSE</a> 文件。</p></article></section></div></div></div><div class="search-container" id="PkfLWpAbet" style="display:none"><div class="wrapper" id="iCxFxjkHbP"><button class="icon-button search-close-button" id="VjLlGakifb" aria-label="关闭搜索"><svg><use xlink:href="#close-icon"></use></svg></button><div class="search-box-c"><svg><use xlink:href="#search-icon"></use></svg> <input type="text" id="vpcKVYIppa" class="search-input" placeholder="搜索..." autofocus></div><div class="search-result-c" id="fWwVHRuDuN"><span class="search-result-c-text">输入任何内容查看搜索结果</span></div></div></div><div class="mobile-menu-icon-container"><button class="icon-button" id="mobile-menu" data-isopen="false" aria-label="menu"><svg><use xlink:href="#menu-icon"></use></svg></button></div><div id="mobile-sidebar" class="mobile-sidebar-container"><div class="mobile-sidebar-wrapper"><div class="mobile-nav-links"></div><div class="mobile-sidebar-items-c"><div class="sidebar-section-title"><a href="index.html" class="sidebar-home-anchor">首页</a></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-类"><div>类</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="Logger.html">Logger</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-全局"><div>全局</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="global.html#FACTORY_DEFAULT_APPENDER">FACTORY_DEFAULT_APPENDER</a></div><div class="sidebar-section-children"><a href="global.html#FACTORY_DEFAULT_LEVEL">FACTORY_DEFAULT_LEVEL</a></div><div class="sidebar-section-children"><a href="global.html#HasLogger">HasLogger</a></div><div class="sidebar-section-children"><a href="global.html#LOGGING_LEVELS">LOGGING_LEVELS</a></div><div class="sidebar-section-children"><a href="global.html#Log">Log</a></div></div></div><div class="mobile-navbar-actions"><div class="navbar-right-item"><button class="icon-button home-button" aria-label="go-to-homepage"><svg><use xlink:href="#home-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button search-button" aria-label="open-search"><svg><use xlink:href="#search-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button theme-toggle" aria-label="toggle-theme"><svg><use class="theme-svg-use" xlink:href="#light-theme-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button font-size" aria-label="change-font-size"><svg><use xlink:href="#font-size-icon"></use></svg></button></div></div></div></div><script type="text/javascript" src="scripts/core.min.js"></script><script src="scripts/search.min.js" defer="defer"></script><script src="scripts/third-party/fuse.js" defer="defer"></script><script type="text/javascript">var tocbotInstance=tocbot.init({tocSelector:"#eed4d2a0bfd64539bb9df78095dec881",contentSelector:".main-content",headingSelector:"h1, h2, h3",hasInnerContainers:!0,scrollContainer:".main-content",headingsOffset:130,onClick:bringLinkToView})</script><script>document.addEventListener("DOMContentLoaded",function(){"undefined"!=typeof tippy&&(tippy(".home-button",{content:"回到首页",delay:500}),tippy(".theme-toggle",{content:"切换主题",delay:500}),tippy(".search-button",{content:"搜索",delay:500}),tippy(".font-size",{content:"更改字体大小",delay:500}))})</script></body></html>
@@ -179,7 +179,7 @@ function bringElementIntoView(element, updateHistory = true) {
179
179
  setTimeout(
180
180
  // eslint-disable-next-line no-undef
181
181
  () => tocbotInstance.updateTocListActiveElement(element),
182
- 60
182
+ 60,
183
183
  );
184
184
  }
185
185
  var navbar = document.querySelector(".navbar-container");
@@ -431,7 +431,7 @@ function localUpdateFontSize(fontSize) {
431
431
  html.style.fontSize = fontSize + "px";
432
432
 
433
433
  var fontSizeText = document.querySelector(
434
- "#b77a68a492f343baabea06fad81f651e"
434
+ "#b77a68a492f343baabea06fad81f651e",
435
435
  );
436
436
 
437
437
  if (fontSizeText) {
@@ -621,7 +621,7 @@ function highlightActiveLinkInSidebar() {
621
621
  if (!element) {
622
622
  try {
623
623
  element = document.querySelector(
624
- `.sidebar a[href*='${targetURL.split("#")[0]}']`
624
+ `.sidebar a[href*='${targetURL.split("#")[0]}']`,
625
625
  );
626
626
  } catch (e) {
627
627
  console.error(e);
@@ -11,7 +11,7 @@ var NAVBAR_OPTIONS = {};
11
11
  var mainSection = document.querySelector("#main");
12
12
  var localStorageResizeObject = JSON.parse(
13
13
  // eslint-disable-next-line no-undef
14
- localStorage.getItem(NAVBAR_RESIZE_LOCAL_STORAGE_KEY)
14
+ localStorage.getItem(NAVBAR_RESIZE_LOCAL_STORAGE_KEY),
15
15
  );
16
16
 
17
17
  /**
@@ -66,7 +66,7 @@ var NAVBAR_OPTIONS = {};
66
66
  NAVBAR_RESIZE_LOCAL_STORAGE_KEY,
67
67
  JSON.stringify({
68
68
  width: navbar.style.width,
69
- })
69
+ }),
70
70
  );
71
71
  }
72
72