source: trip-planner-front/node_modules/webpack-dev-server/client/utils/log.js@ 8d391a1

Last change on this file since 8d391a1 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 964 bytes
RevLine 
[6a3a178]1'use strict';
2
3var log = require('loglevel').getLogger('webpack-dev-server');
4
5var INFO = 'info';
6var WARN = 'warn';
7var ERROR = 'error';
8var DEBUG = 'debug';
9var TRACE = 'trace';
10var SILENT = 'silent'; // deprecated
11// TODO: remove these at major released
12// https://github.com/webpack/webpack-dev-server/pull/1825
13
14var WARNING = 'warning';
15var NONE = 'none'; // Set the default log level
16
17log.setDefaultLevel(INFO);
18
19function setLogLevel(level) {
20 switch (level) {
21 case INFO:
22 case WARN:
23 case ERROR:
24 case DEBUG:
25 case TRACE:
26 log.setLevel(level);
27 break;
28 // deprecated
29
30 case WARNING:
31 // loglevel's warning name is different from webpack's
32 log.setLevel('warn');
33 break;
34 // deprecated
35
36 case NONE:
37 case SILENT:
38 log.disableAll();
39 break;
40
41 default:
42 log.error("[WDS] Unknown clientLogLevel '".concat(level, "'"));
43 }
44}
45
46module.exports = {
47 log: log,
48 setLogLevel: setLogLevel
49};
Note: See TracBrowser for help on using the repository browser.