File tree 4 files changed +23
-12
lines changed
4 files changed +23
-12
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' standard-log-color ' : patch
3
+ ' standard-log ' : patch
4
+ ---
5
+
6
+ Adjust jsdoc.
7
+
8
+ Remove the ` import { ... } from 'standard-log' ` from the examples.
9
+ This allows the type and docs to be reused when other packages exports the types or instances.
Original file line number Diff line number Diff line change @@ -31,8 +31,8 @@ let value: supportColor.Result
31
31
/**
32
32
* Detects if the platform supports color.
33
33
* For browser, the value can only be:
34
- * - `{ stdout: 0, stderr: 0 }`, or
35
- * - `{ stdout: 3, stderr: 3 }`.
34
+ * - `{ stdout: 0, stderr: 0 }` (DISABLED) , or
35
+ * - `{ stdout: 3, stderr: 3 }` (TRUE) .
36
36
* So you only need to check one case.
37
37
* The result value is made the same so that it can be used in all platforms.
38
38
*/
Original file line number Diff line number Diff line change @@ -7,10 +7,18 @@ export type CssFormatterOptions = {
7
7
* Default to 20.
8
8
*/
9
9
maxColor ?: number
10
+ /**
11
+ * Style of the timestamp.
12
+ * Defaults to `none`.
13
+ *
14
+ * - `none`: no timestamp.
15
+ * - `iso`: in iso format.
16
+ * - `long`: as elapsed time.
17
+ */
10
18
timestamp ?: TimestampFormat
11
19
/**
12
20
* style of the id block.
13
- * Defaults to `padding: 2px; margin: 2px; line-height: 1.8em ;`
21
+ * Defaults to `padding: 2px; line-height: 1rem ;`
14
22
*/
15
23
style ?: string
16
24
}
@@ -19,7 +27,7 @@ export type ColorLogReporterOptions = ConsoleLogReporterOptions & {
19
27
/**
20
28
* CSS formatter options.
21
29
* This can be used to specify the CSS formatter options in the browser,
22
- * IF you do not specify your own `formatter`.
30
+ * If you do not specify your own `formatter`.
23
31
*/
24
32
cssFormatterOptions ?: CssFormatterOptions
25
33
}
Original file line number Diff line number Diff line change @@ -89,9 +89,6 @@ export interface StandardLogInstance<N extends string = LogMethodNames> {
89
89
* Get a logger instance with the specified id.
90
90
*
91
91
* ```ts
92
- * import { createStandardLog } from 'standard-log'
93
- *
94
- * const sl = createStandardLog()
95
92
* const logger = sl.getLogger('my-logger')
96
93
*
97
94
* logger.info('Hello world!') // 2020-01-01T00:00:00.000Z my-logger (INFO) Hello world!
@@ -101,15 +98,12 @@ export interface StandardLogInstance<N extends string = LogMethodNames> {
101
98
/**
102
99
* Get a non-console logger instance with the specified id.
103
100
*
104
- * The resulting logger will only write to the reporters that are not console reporters.
101
+ * The resulting logger will only send to the reporters that are not console reporters.
105
102
*
106
103
* ```ts
107
- * import { createStandardLog } from 'standard-log'
108
- *
109
- * const sl = createStandardLog({ reporter: [createConsoleReporter(), createRemoteReporter(...)] })
110
104
* const logger = sl.getNonConsoleLogger('my-logger')
111
105
*
112
- * logger.info('Hello world!') // will only write to remote reporter
106
+ * logger.info('Hello world!') // will not send to any console reporter
113
107
* ```
114
108
*/
115
109
getNonConsoleLogger ( id : string , options ?: LoggerOptions ) : Logger < N | LogMethodNames >
You can’t perform that action at this time.
0 commit comments