@qubit-ltd/logging 1.4.8 → 1.4.10

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.
Files changed (65) hide show
  1. package/README.md +25 -25
  2. package/README.zh_CN.md +12 -12
  3. package/doc/api/Logger.html +3 -3352
  4. package/doc/api/data/search.json +1 -0
  5. package/doc/api/fonts/Inconsolata-Regular.ttf +0 -0
  6. package/doc/api/fonts/OpenSans-Regular.ttf +0 -0
  7. package/doc/api/fonts/WorkSans-Bold.ttf +0 -0
  8. package/doc/api/global.html +6 -755
  9. package/doc/api/index.html +29 -248
  10. package/doc/api/scripts/core.js +726 -0
  11. package/doc/api/scripts/core.min.js +23 -0
  12. package/doc/api/scripts/resize.js +90 -0
  13. package/doc/api/scripts/search.js +265 -0
  14. package/doc/api/scripts/search.min.js +6 -0
  15. package/doc/api/scripts/{prettify → third-party}/Apache-License-2.0.txt +202 -202
  16. package/doc/api/scripts/third-party/fuse.js +9 -0
  17. package/doc/api/scripts/third-party/hljs-line-num-original.js +369 -0
  18. package/doc/api/scripts/third-party/hljs-line-num.js +1 -0
  19. package/doc/api/scripts/third-party/hljs-original.js +5171 -0
  20. package/doc/api/scripts/third-party/hljs.js +1 -0
  21. package/doc/api/scripts/third-party/popper.js +5 -0
  22. package/doc/api/scripts/third-party/tippy.js +1 -0
  23. package/doc/api/scripts/third-party/tocbot.js +672 -0
  24. package/doc/api/scripts/third-party/tocbot.min.js +1 -0
  25. package/doc/api/styles/clean-jsdoc-theme-base.css +1159 -0
  26. package/doc/api/styles/clean-jsdoc-theme-dark.css +412 -0
  27. package/doc/api/styles/clean-jsdoc-theme-light.css +482 -0
  28. package/doc/api/styles/clean-jsdoc-theme-scrollbar.css +30 -0
  29. package/doc/api/styles/clean-jsdoc-theme-without-scrollbar.min.css +1 -0
  30. package/doc/api/styles/clean-jsdoc-theme.min.css +1 -0
  31. package/doc/logging.min.visualization.html +1 -1
  32. package/doc/logging.visualization.html +1 -1
  33. package/package.json +2 -2
  34. package/doc/api/fonts/OpenSans-Bold-webfont.eot +0 -0
  35. package/doc/api/fonts/OpenSans-Bold-webfont.svg +0 -1838
  36. package/doc/api/fonts/OpenSans-Bold-webfont.woff +0 -0
  37. package/doc/api/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
  38. package/doc/api/fonts/OpenSans-BoldItalic-webfont.svg +0 -1838
  39. package/doc/api/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
  40. package/doc/api/fonts/OpenSans-Italic-webfont.eot +0 -0
  41. package/doc/api/fonts/OpenSans-Italic-webfont.svg +0 -1838
  42. package/doc/api/fonts/OpenSans-Italic-webfont.woff +0 -0
  43. package/doc/api/fonts/OpenSans-Light-webfont.eot +0 -0
  44. package/doc/api/fonts/OpenSans-Light-webfont.svg +0 -1839
  45. package/doc/api/fonts/OpenSans-Light-webfont.woff +0 -0
  46. package/doc/api/fonts/OpenSans-LightItalic-webfont.eot +0 -0
  47. package/doc/api/fonts/OpenSans-LightItalic-webfont.svg +0 -1843
  48. package/doc/api/fonts/OpenSans-LightItalic-webfont.woff +0 -0
  49. package/doc/api/fonts/OpenSans-Regular-webfont.eot +0 -0
  50. package/doc/api/fonts/OpenSans-Regular-webfont.svg +0 -1839
  51. package/doc/api/fonts/OpenSans-Regular-webfont.woff +0 -0
  52. package/doc/api/fonts/OpenSans-Semibold-webfont.eot +0 -0
  53. package/doc/api/fonts/OpenSans-Semibold-webfont.svg +0 -1838
  54. package/doc/api/fonts/OpenSans-Semibold-webfont.ttf +0 -0
  55. package/doc/api/fonts/OpenSans-Semibold-webfont.woff +0 -0
  56. package/doc/api/fonts/OpenSans-SemiboldItalic-webfont.eot +0 -0
  57. package/doc/api/fonts/OpenSans-SemiboldItalic-webfont.svg +0 -1838
  58. package/doc/api/fonts/OpenSans-SemiboldItalic-webfont.ttf +0 -0
  59. package/doc/api/fonts/OpenSans-SemiboldItalic-webfont.woff +0 -0
  60. package/doc/api/scripts/linenumber.js +0 -34
  61. package/doc/api/scripts/prettify/lang-css.js +0 -2
  62. package/doc/api/scripts/prettify/prettify.js +0 -28
  63. package/doc/api/styles/jsdoc-default.css +0 -699
  64. package/doc/api/styles/prettify-jsdoc.css +0 -120
  65. package/doc/api/styles/prettify-tomorrow.css +0 -141
@@ -1,346 +1,6 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width,initial-scale=1">
6
- <title>Global - Documentation</title>
7
-
8
- <script src="scripts/prettify/prettify.js"></script>
9
- <script src="scripts/prettify/lang-css.js"></script>
10
- <!--[if lt IE 9]>
11
- <script src="https://cdn.bootcdn.net/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
12
- <![endif]-->
13
- <link type="text/css" rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
14
- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
15
- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
16
- </head>
17
- <body>
18
-
19
- <input type="checkbox" id="nav-trigger" class="nav-trigger" />
20
- <label for="nav-trigger" class="navicon-button x">
21
- <div class="navicon"></div>
22
- </label>
23
-
24
- <label for="nav-trigger" class="overlay"></label>
25
-
26
- <nav>
27
- <li class="nav-link nav-home-link"><a href="index.html">Home</a></li><li class="nav-heading">Classes</li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="Logger.html">Logger</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Logger.html#disable">disable</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Logger.html#enable">enable</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Logger.html#getAppender">getAppender</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Logger.html#getLevel">getLevel</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Logger.html#getName">getName</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Logger.html#log">log</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Logger.html#setAppender">setAppender</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Logger.html#setEnabled">setEnabled</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Logger.html#setLevel">setLevel</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Logger.html#.clearAllLoggers">clearAllLoggers</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Logger.html#.getDefaultAppender">getDefaultAppender</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Logger.html#.getDefaultLevel">getDefaultLevel</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Logger.html#.getLogger">getLogger</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Logger.html#.getLoggerLevel">getLoggerLevel</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Logger.html#.reset">reset</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Logger.html#.resetAllAppenders">resetAllAppenders</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Logger.html#.resetAllLevels">resetAllLevels</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Logger.html#.resetDefaultAppender">resetDefaultAppender</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Logger.html#.resetDefaultLevel">resetDefaultLevel</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Logger.html#.setAllAppenders">setAllAppenders</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Logger.html#.setAllLevels">setAllLevels</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Logger.html#.setDefaultAppender">setDefaultAppender</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Logger.html#.setDefaultLevel">setDefaultLevel</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Logger.html#.setLoggerLevel">setLoggerLevel</a></span></li><li class="nav-heading"><a href="global.html">Globals</a></li><li class="nav-item"><span class="nav-item-type type-member">M</span><span class="nav-item-name"><a href="global.html#FACTORY_DEFAULT_APPENDER">FACTORY_DEFAULT_APPENDER</a></span></li><li class="nav-item"><span class="nav-item-type type-member">M</span><span class="nav-item-name"><a href="global.html#FACTORY_DEFAULT_LEVEL">FACTORY_DEFAULT_LEVEL</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#HasLogger">HasLogger</a></span></li><li class="nav-item"><span class="nav-item-type type-member">M</span><span class="nav-item-name"><a href="global.html#LOGGING_LEVELS">LOGGING_LEVELS</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="global.html#Log">Log</a></span></li>
28
- </nav>
29
-
30
- <div id="main">
31
-
32
- <h1 class="page-title">Global</h1>
33
-
34
-
35
-
36
-
37
-
38
-
39
-
40
- <section>
41
-
42
- <header>
43
-
44
- <h2>
45
-
46
- </h2>
47
-
48
-
49
- </header>
50
-
51
- <article>
52
- <div class="container-overview">
53
-
54
-
55
-
56
-
57
-
58
-
59
- <dl class="details">
60
-
61
-
62
-
63
-
64
-
65
-
66
-
67
-
68
-
69
-
70
-
71
-
72
-
73
-
74
-
75
-
76
-
77
-
78
-
79
-
80
-
81
-
82
-
83
-
84
-
85
-
86
-
87
-
88
-
89
-
90
-
91
-
92
- </dl>
93
-
94
-
95
-
96
-
97
- </div>
98
-
99
-
100
-
101
-
102
-
103
-
104
-
105
-
106
-
107
-
108
-
109
-
110
- <h3 class="subsection-title">Members</h3>
111
-
112
-
113
-
114
- <div class="section-members">
115
- <h4 class="name" id="FACTORY_DEFAULT_APPENDER"><span class="type-signature">(constant) </span>FACTORY_DEFAULT_APPENDER<span class="type-signature"> :Console</span></h4>
116
-
117
-
118
-
119
-
120
- <div class="description">
121
- <p>The factory value of the Logger class's default log appender, which is
122
- the standard output pipe of the console.</p>
123
- </div>
124
-
125
-
126
-
127
-
128
-
129
- <dl class="details">
130
-
131
-
132
-
133
-
134
-
135
-
136
-
137
-
138
-
139
-
140
-
141
-
142
-
143
-
144
-
145
-
146
-
147
-
148
-
149
-
150
-
151
-
152
-
153
-
154
-
155
-
156
-
157
-
158
-
159
-
160
-
161
-
162
- </dl>
163
-
164
-
165
-
166
- <h5>Type:</h5>
167
- <ul>
168
- <li>
169
-
170
- <span class="param-type"><code>Console</code></span>
171
-
172
-
173
- </li>
174
- </ul>
175
-
176
-
177
-
178
-
179
-
180
- </div>
181
-
182
-
183
-
184
- <div class="section-members">
185
- <h4 class="name" id="FACTORY_DEFAULT_LEVEL"><span class="type-signature">(constant) </span>FACTORY_DEFAULT_LEVEL<span class="type-signature"> :string</span></h4>
186
-
187
-
188
-
189
-
190
- <div class="description">
191
- <p>The factory value of the Logger class's default logging level,
192
- which is <code>DEBUG</code>.</p>
193
- </div>
194
-
195
-
196
-
197
-
198
-
199
- <dl class="details">
200
-
201
-
202
-
203
-
204
-
205
-
206
-
207
-
208
-
209
-
210
-
211
-
212
-
213
-
214
-
215
-
216
-
217
-
218
-
219
-
220
-
221
-
222
-
223
-
224
-
225
-
226
-
227
-
228
-
229
-
230
-
231
-
232
- </dl>
233
-
234
-
235
-
236
- <h5>Type:</h5>
237
- <ul>
238
- <li>
239
-
240
- <span class="param-type"><code>string</code></span>
241
-
242
-
243
- </li>
244
- </ul>
245
-
246
-
247
-
248
-
249
-
250
- </div>
251
-
252
-
253
-
254
- <div class="section-members">
255
- <h4 class="name" id="LOGGING_LEVELS"><span class="type-signature">(constant) </span>LOGGING_LEVELS<span class="type-signature"></span></h4>
256
-
257
-
258
-
259
-
260
- <div class="description">
261
- <p>Predefined logging levels.</p>
262
- </div>
263
-
264
-
265
-
266
-
267
-
268
- <dl class="details">
269
-
270
-
271
-
272
-
273
-
274
-
275
-
276
-
277
-
278
-
279
-
280
-
281
-
282
-
283
-
284
-
285
-
286
-
287
- <dt class="tag-author">Author:</dt>
288
- <dd class="tag-author">
289
- <ul>
290
- <li>Haixing Hu</li>
291
- </ul>
292
- </dd>
293
-
294
-
295
-
296
-
297
-
298
-
299
-
300
-
301
-
302
-
303
-
304
-
305
-
306
-
307
-
308
- </dl>
309
-
310
-
311
-
312
-
313
-
314
-
315
-
316
- </div>
317
-
318
-
319
-
320
-
321
-
322
- <h3 class="subsection-title">Methods</h3>
323
-
324
-
325
-
326
- <div class="section-method">
327
-
328
-
329
-
330
-
331
- <h4 class="name" id="HasLogger"><span class="type-signature"></span>HasLogger<span class="signature">(Class, context)</span><span class="type-signature"> &rarr; {function}</span></h4>
332
-
333
-
334
-
335
-
336
-
337
-
338
- <div class="description">
339
- <p>A decorator to add a named logger to a class.</p>
340
- <p>This decorator will add a named logger to the class, which can be accessed
341
- via the <code>logger</code> property of the class.</p>
342
- <p>Example usage:</p>
343
- <pre class="prettyprint source lang-js"><code>import { HasLogger } from '@haixing_hu/logging';
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
+ <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="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 with-arrow" data-isopen="false" id="sidebar-classes"><div>Classes</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-global"><div>Global</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 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">On this page</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="members" class="subsection-title has-anchor">Members</h2><h3 class="name has-anchor" id="FACTORY_DEFAULT_APPENDER"><span class="type-signature">(constant) </span>FACTORY_DEFAULT_APPENDER<span class="type-signature"> :Console</span></h3><div class="description"><p>The factory value of the Logger class's default log appender, which is the standard output pipe of the console.</p></div><div class="member-item-container flex"><strong>Type:</strong><ul><li><span class="param-type">Console</span></li></ul></div><h3 class="name has-anchor" id="FACTORY_DEFAULT_LEVEL"><span class="type-signature">(constant) </span>FACTORY_DEFAULT_LEVEL<span class="type-signature"> :string</span></h3><div class="description"><p>The factory value of the Logger class's default logging level, which is <code>DEBUG</code>.</p></div><div class="member-item-container flex"><strong>Type:</strong><ul><li><span class="param-type">string</span></li></ul></div><h3 class="name has-anchor" id="LOGGING_LEVELS"><span class="type-signature">(constant) </span>LOGGING_LEVELS<span class="type-signature"></span></h3><div class="description"><p>Predefined logging levels.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-author bold">Author</dt><dd class="tag-author"><ul><li>Haixing Hu</li></ul></dd></div></dl><h2 id="methods" class="subsection-title has-anchor">Methods</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';
344
4
 
345
5
  &#064;HasLogger
346
6
  class MyClass {
@@ -348,9 +8,7 @@ class MyClass {
348
8
  this.logger.debug('This is MyClass.foo()');
349
9
  }
350
10
  }
351
- </code></pre>
352
- <p>The following is another example usage with the class component of Vue.js:</p>
353
- <pre class="prettyprint source lang-js"><code>import { Component, toVue } from '@haixing_hu/vue3-class-component';
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';
354
12
  import { HasLogger, Log } from '@haixing_hu/logging';
355
13
 
356
14
  &#064;Component({
@@ -365,209 +23,7 @@ class MyComponent {
365
23
  }
366
24
 
367
25
  export default toVue(MyComponent);
368
- </code></pre>
369
- <p><strong>NOTE</strong>: the order of the decorators is IMPORTANT. The <code>@HasLogger</code> decorator
370
- must be placed <strong>AFTER</strong> the <code>@Component</code> decorator.</p>
371
- </div>
372
-
373
-
374
-
375
-
376
-
377
- <dl class="details">
378
-
379
-
380
-
381
-
382
-
383
-
384
-
385
-
386
-
387
-
388
-
389
-
390
-
391
-
392
-
393
-
394
-
395
-
396
- <dt class="tag-author">Author:</dt>
397
- <dd class="tag-author">
398
- <ul>
399
- <li>Haixing Hu</li>
400
- </ul>
401
- </dd>
402
-
403
-
404
-
405
-
406
-
407
-
408
-
409
-
410
-
411
-
412
-
413
-
414
-
415
-
416
-
417
- </dl>
418
-
419
-
420
-
421
-
422
-
423
-
424
-
425
-
426
-
427
- <h5>Parameters:</h5>
428
-
429
-
430
- <table class="params">
431
- <thead>
432
- <tr>
433
-
434
- <th>Name</th>
435
-
436
-
437
- <th>Type</th>
438
-
439
-
440
-
441
-
442
-
443
- <th class="last">Description</th>
444
- </tr>
445
- </thead>
446
-
447
- <tbody>
448
-
449
-
450
- <tr>
451
-
452
- <td class="name"><code>Class</code></td>
453
-
454
-
455
- <td class="type">
456
-
457
-
458
- <span class="param-type"><code>function</code></span>
459
-
460
-
461
-
462
- </td>
463
-
464
-
465
-
466
-
467
-
468
- <td class="description last">
469
- <p>the target class to be decorated.</p>
470
-
471
- </td>
472
- </tr>
473
-
474
-
475
-
476
- <tr>
477
-
478
- <td class="name"><code>context</code></td>
479
-
480
-
481
- <td class="type">
482
-
483
-
484
- <span class="param-type"><code>object</code></span>
485
-
486
-
487
-
488
- </td>
489
-
490
-
491
-
492
-
493
-
494
- <td class="description last">
495
- <p>the context object containing information about the class to be decorated.</p>
496
-
497
- </td>
498
- </tr>
499
-
500
-
501
- </tbody>
502
- </table>
503
-
504
-
505
-
506
-
507
-
508
-
509
-
510
-
511
-
512
-
513
-
514
-
515
-
516
-
517
-
518
-
519
- <div class="section-returns">
520
- <h5>Returns:</h5>
521
-
522
-
523
-
524
- <dl class="param-type">
525
- <dt>
526
- Type:
527
- </dt>
528
- <dd>
529
-
530
- <span class="param-type"><code>function</code></span>
531
-
532
-
533
- </dd>
534
- </dl>
535
-
536
-
537
- <div class="param-desc">
538
- <p>the new constructor of the decorated class.</p>
539
- </div>
540
-
541
-
542
- </div>
543
-
544
-
545
-
546
-
547
-
548
- </div>
549
-
550
-
551
- <div class="section-method">
552
-
553
-
554
-
555
-
556
- <h4 class="name" id="Log"><span class="type-signature"></span>Log<span class="signature">(target, context)</span><span class="type-signature"> &rarr; {function}</span></h4>
557
-
558
-
559
-
560
-
561
-
562
-
563
- <div class="description">
564
- <p>Defines a class method decorator that modifies the target method and prints
565
- its calling signature in the log, including class name, method name and
566
- parameters.</p>
567
- <p>Note that only non-constructor class method can be decorated by this decorator.
568
- The global function and class constructor CANNOT be decorated by this decorator.</p>
569
- <p>Usage example:</p>
570
- <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>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</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">Author</dt><dd class="tag-author"><ul><li>Haixing Hu</li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>the new constructor of the decorated class.</p></div><dl class="param-type"><dt>Type:&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';
571
27
 
572
28
  class Person {
573
29
  &#064;Log
@@ -579,209 +35,4 @@ class Person {
579
35
  const person = new Person();
580
36
  const meal = new Meal();
581
37
  person.eat(meal); // 日志中将会打印此方法调用的签名
582
- </code></pre>
583
- </div>
584
-
585
-
586
-
587
-
588
-
589
- <dl class="details">
590
-
591
-
592
-
593
-
594
-
595
-
596
-
597
-
598
-
599
-
600
-
601
-
602
-
603
-
604
-
605
-
606
-
607
-
608
- <dt class="tag-author">Author:</dt>
609
- <dd class="tag-author">
610
- <ul>
611
- <li>Haixing Hu</li>
612
- </ul>
613
- </dd>
614
-
615
-
616
-
617
-
618
-
619
-
620
-
621
-
622
-
623
-
624
-
625
-
626
-
627
-
628
-
629
- </dl>
630
-
631
-
632
-
633
-
634
-
635
-
636
-
637
-
638
-
639
- <h5>Parameters:</h5>
640
-
641
-
642
- <table class="params">
643
- <thead>
644
- <tr>
645
-
646
- <th>Name</th>
647
-
648
-
649
- <th>Type</th>
650
-
651
-
652
-
653
-
654
-
655
- <th class="last">Description</th>
656
- </tr>
657
- </thead>
658
-
659
- <tbody>
660
-
661
-
662
- <tr>
663
-
664
- <td class="name"><code>target</code></td>
665
-
666
-
667
- <td class="type">
668
-
669
-
670
- <span class="param-type"><code>function</code></span>
671
-
672
-
673
-
674
- </td>
675
-
676
-
677
-
678
-
679
-
680
- <td class="description last">
681
- <p>The method being decorated.</p>
682
-
683
- </td>
684
- </tr>
685
-
686
-
687
-
688
- <tr>
689
-
690
- <td class="name"><code>context</code></td>
691
-
692
-
693
- <td class="type">
694
-
695
-
696
- <span class="param-type"><code>object</code></span>
697
-
698
-
699
-
700
- </td>
701
-
702
-
703
-
704
-
705
-
706
- <td class="description last">
707
- <p>the context object containing information about the method to be decorated.</p>
708
-
709
- </td>
710
- </tr>
711
-
712
-
713
- </tbody>
714
- </table>
715
-
716
-
717
-
718
-
719
-
720
-
721
-
722
-
723
-
724
-
725
-
726
-
727
-
728
-
729
-
730
-
731
- <div class="section-returns">
732
- <h5>Returns:</h5>
733
-
734
-
735
-
736
- <dl class="param-type">
737
- <dt>
738
- Type:
739
- </dt>
740
- <dd>
741
-
742
- <span class="param-type"><code>function</code></span>
743
-
744
-
745
- </dd>
746
- </dl>
747
-
748
-
749
- <div class="param-desc">
750
- <p>The decorated method.</p>
751
- </div>
752
-
753
-
754
- </div>
755
-
756
-
757
-
758
-
759
-
760
- </div>
761
-
762
-
763
-
764
-
765
-
766
-
767
- </article>
768
-
769
- </section>
770
-
771
-
772
-
773
-
774
- </div>
775
-
776
- <br class="clear">
777
-
778
- <footer>
779
- Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a>
780
- on Wed Apr 16 2025 17:13:07 GMT+0800 (China Standard Time)
781
- using the <a href="https://github.com/Haixing-Hu/jsdoc-minami">customized Minami theme</a>.
782
- </footer>
783
-
784
- <script>prettyPrint();</script>
785
- <script src="scripts/linenumber.js"></script>
786
- </body>
787
- </html>
38
+ </code></pre></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</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">Author</dt><dd class="tag-author"><ul><li>Haixing Hu</li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>The decorated method.</p></div><dl class="param-type"><dt>Type:&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="close search"><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="Search..." autofocus></div><div class="search-result-c" id="fWwVHRuDuN"><span class="search-result-c-text">Type anything to view search result</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 with-arrow" data-isopen="false" id="sidebar-classes"><div>Classes</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-global"><div>Global</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 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></body></html>