@@ -150,19 +150,26 @@ export class DeviceLogProvider extends DeviceLogProviderBase {
150
150
}
151
151
152
152
private printLine ( prefix : string , ...parts : string [ ] ) {
153
- const maxWidth = process . stdout . columns - 2 ;
154
153
const fullLine = parts . join ( " " ) ;
155
-
156
- // console.log(prefix, fullLine);
157
- // return;
158
- if ( ! maxWidth || maxWidth < 10 || fullLine . length < maxWidth ) {
159
- console . log ( prefix , fullLine ) ;
160
- } else {
161
- for ( let i = 0 ; i < fullLine . length ; i += maxWidth ) {
162
- const part = fullLine . substring ( i , i + maxWidth ) ;
163
- console . log ( prefix , part ) ;
164
- }
165
- }
154
+ console . log ( prefix , fullLine ) ;
155
+
156
+ /**
157
+ * Note: Disabled
158
+ *
159
+ * This splits the output into lines that fit within the current
160
+ * terminal width, however this makes copying json objects that
161
+ * span across multiple lines difficult, as it introduces
162
+ * whitespace & line breaks
163
+ */
164
+ // const maxWidth = process.stdout.columns - 2;
165
+ // if (!maxWidth || maxWidth < 10 || fullLine.length < maxWidth) {
166
+ // console.log(prefix, fullLine);
167
+ // } else {
168
+ // for (let i = 0; i < fullLine.length; i += maxWidth) {
169
+ // const part = fullLine.substring(i, i + maxWidth);
170
+ // console.log(prefix, part);
171
+ // }
172
+ // }
166
173
}
167
174
}
168
175
injector . register ( "deviceLogProvider" , DeviceLogProvider ) ;
0 commit comments