File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ Shortcut to `withDefaults({ scope })`.
138
138
139
139
- ` level `
140
140
141
- The level to display logs. Any logs at or above this level will be displayed.
141
+ The level to display logs. Any logs at or above this level will be displayed.
142
142
List of available levels [ here] ( ./src/types.js )
143
143
144
144
## logObject
@@ -158,6 +158,7 @@ Extended fields:
158
158
- ` clear `
159
159
- ` badge `
160
160
- ` additional `
161
+ - ` stack `
161
162
- ` additionalStyle ` (By default: ` grey ` )
162
163
- ` icon ` (Default depends on log type)
163
164
Original file line number Diff line number Diff line change @@ -21,5 +21,9 @@ export default class BasicReporter {
21
21
if ( logObj . additional ) {
22
22
this . stream . write ( logObj . additional + '\n' )
23
23
}
24
+
25
+ if ( logObj . stack ) {
26
+ this . stream . write ( logObj . stack + '\n' )
27
+ }
24
28
}
25
29
}
Original file line number Diff line number Diff line change @@ -59,5 +59,11 @@ export default class FancyReporter {
59
59
const lines = logObj . additional . split ( '\n' ) . map ( s => ' ' + s ) . join ( '\n' )
60
60
this . stream . write ( chalk [ logObj . additionalStyle || 'grey' ] ( lines ) + '\n' )
61
61
}
62
+
63
+ if ( logObj . stack ) {
64
+ const stack = Array . isArray ( logObj . stack ) ? logObj . stack : logObj . stack . split ( '\n' )
65
+ const lines = stack . map ( s => ' ' + s . trim ( ) ) . join ( '\n' )
66
+ this . stream . write ( chalk [ logObj . additionalStyle || 'grey' ] ( lines ) + '\n' )
67
+ }
62
68
}
63
69
}
You can’t perform that action at this time.
0 commit comments