Skip to content

Commit

Permalink
Set HMR log level. (#926)
Browse files Browse the repository at this point in the history
* Set HMR log level.

* Set HMR log level - check if webpack/hot/log exists.
  • Loading branch information
lbogdan authored and shellscape committed Jul 10, 2017
1 parent 140da45 commit 6da2f38
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ var onSocketMsg = {
sendMsg("StillOk");
},
"log-level": function(level) {
var hotCtx = require.context("webpack/hot", false, /^\.\/log$/);
if(hotCtx.keys().length > 0) {
hotCtx("./log").setLogLevel(level);
}
switch(level) {
case INFO:
case ERROR:
Expand Down

0 comments on commit 6da2f38

Please sign in to comment.