You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
plutils.error('\nERROR: missing an essential file from '+paths.source.patternlabFiles+'. Pattern Lab won\'t work without this file.\n');
107
+
logger.error('\nERROR: missing an essential file from '+paths.source.patternlabFiles+'. Pattern Lab won\'t work without this file.\n');
108
108
109
109
// GTP: it seems increasingly naughty as we refactor to just unilaterally do this here,
110
110
// but whatever. For now.
@@ -168,7 +168,7 @@ class PatternLab {
168
168
this.userHead=headPattern.extendedTemplate;
169
169
}
170
170
catch(ex){
171
-
plutils.error('\nWARNING: Could not find the user-editable header template, currently configured to be at '+path.join(this.config.paths.source.meta,'_00-head.mustache')+'. Your configured path may be incorrect (check this.config.paths.source.meta in your config file), the file may have been deleted, or it may have been left in the wrong place during a migration or update.\n');
171
+
logger.error('\nWARNING: Could not find the user-editable header template, currently configured to be at '+path.join(this.config.paths.source.meta,'_00-head.mustache')+'. Your configured path may be incorrect (check this.config.paths.source.meta in your config file), the file may have been deleted, or it may have been left in the wrong place during a migration or update.\n');
172
172
if(this.config.debug){console.log(ex);}
173
173
174
174
// GTP: it seems increasingly naughty as we refactor to just unilaterally do this here,
@@ -191,7 +191,7 @@ class PatternLab {
191
191
this.userFoot=footPattern.extendedTemplate;
192
192
}
193
193
catch(ex){
194
-
plutils.error('\nWARNING: Could not find the user-editable footer template, currently configured to be at '+path.join(this.config.paths.source.meta,'_01-foot.mustache')+'. Your configured path may be incorrect (check this.config.paths.source.meta in your config file), the file may have been deleted, or it may have been left in the wrong place during a migration or update.\n');
194
+
logger.error('\nWARNING: Could not find the user-editable footer template, currently configured to be at '+path.join(this.config.paths.source.meta,'_01-foot.mustache')+'. Your configured path may be incorrect (check this.config.paths.source.meta in your config file), the file may have been deleted, or it may have been left in the wrong place during a migration or update.\n');
195
195
if(this.config.debug){console.log(ex);}
196
196
197
197
// GTP: it seems increasingly naughty as we refactor to just unilaterally do this here,
@@ -258,22 +258,22 @@ class PatternLab {
258
258
// handle the legacy value, which is boolean
259
259
if(typeoflogLevel==='boolean'){
260
260
if(logLevel){
261
-
plutils.log.on('debug',msg=>console.log(msg));
261
+
logger.log.on('debug',msg=>console.log(msg));
262
262
}
263
-
plutils.log.on('info',msg=>console.log(msg));
264
-
plutils.log.on('warning',msg=>console.log(msg));
265
-
plutils.log.on('error',msg=>console.log(msg));
263
+
logger.log.on('info',msg=>console.log(msg));
264
+
logger.log.on('warning',msg=>console.log(msg));
265
+
logger.log.on('error',msg=>console.log(msg));
266
266
}else{
267
267
if(logLevel==='quiet'){return;}
268
268
switch(logLevel){
269
269
case'debug':
270
-
plutils.log.on('debug',msg=>console.log(msg));
270
+
logger.log.on('debug',msg=>console.log(msg));
271
271
case'info':
272
-
plutils.log.on('info',msg=>console.log(msg));
272
+
logger.log.on('info',msg=>console.log(msg));
273
273
case'warning':
274
-
plutils.log.on('warning',msg=>console.log(msg));
274
+
logger.log.on('warning',msg=>console.log(msg));
275
275
case'error':
276
-
plutils.log.on('error',msg=>console.log(msg));
276
+
logger.log.on('error',msg=>console.log(msg));
277
277
}
278
278
}
279
279
}
@@ -359,26 +359,26 @@ function checkConfiguration(patternlab) {
359
359
};
360
360
361
361
if(!patternlab.config.outputFileSuffixes){
362
-
plutils.warning('');
363
-
plutils.warning('Configuration key [outputFileSuffixes] not found, and defaulted to the following:');
362
+
logger.warning('');
363
+
logger.warning('Configuration key [outputFileSuffixes] not found, and defaulted to the following:');
364
364
console.log(outputFileSuffixes);
365
-
plutils.warning('Since Pattern Lab Node Core 2.3.0 this configuration option is required. Suggest you add it to your patternlab-config.json file.');
366
-
plutils.warning('');
365
+
logger.warning('Since Pattern Lab Node Core 2.3.0 this configuration option is required. Suggest you add it to your patternlab-config.json file.');
plutils.warning(`Configuration key [paths.source.patternlabFiles] inside patternlab-config.json was found as the string '${patternlab.config.paths.source.patternlabFiles}'`);
373
-
plutils.warning('Since Pattern Lab Node Core 3.0.0 this key is an object. Suggest you update this key following this issue: https://github.com/pattern-lab/patternlab-node/issues/683.');
374
-
plutils.warning('');
371
+
logger.warning('');
372
+
logger.warning(`Configuration key [paths.source.patternlabFiles] inside patternlab-config.json was found as the string '${patternlab.config.paths.source.patternlabFiles}'`);
373
+
logger.warning('Since Pattern Lab Node Core 3.0.0 this key is an object. Suggest you update this key following this issue: https://github.com/pattern-lab/patternlab-node/issues/683.');
374
+
logger.warning('');
375
375
}
376
376
377
377
if(typeofpatternlab.config.debug==='boolean'){
378
-
plutils.warning('');
379
-
plutils.warning(`Configuration key [debug] inside patternlab-config.json was found as a boolean. As of Pattern Lab Node Core 3.0.0 this key is a string with possible values ['debug', 'info', 'warning', 'error', 'quiet'].`);
380
-
plutils.warning(`Turning on 'info', 'warning', and 'error' levels by default`);
381
-
plutils.warning('');
378
+
logger.warning('');
379
+
logger.warning(`Configuration key [debug] inside patternlab-config.json was found as a boolean. As of Pattern Lab Node Core 3.0.0 this key is a string with possible values ['debug', 'info', 'warning', 'error', 'quiet'].`);
380
+
logger.warning(`Turning on 'info', 'warning', and 'error' levels by default`);
381
+
logger.warning('');
382
382
}
383
383
384
384
}
@@ -440,34 +440,34 @@ const patternlab_engine = function (config) {
0 commit comments