How to stop verbose output to the console
See original GitHub issueI have lite-server setup in package.json:
"scripts": {
"start": "concurrently \"npm run tsc:w\" \"npm run scss:w\" \"npm run lite\" ",
"tsc": "tsc --inlineSourceMap --allowSyntheticDefaultImports -outDir .build/js",
"tsc:w": "tsc -w --inlineSourceMap --allowSyntheticDefaultImports -outDir .build/js",
"scss": "node-sass --include-path styles/app.scss .build/css/app.css",
"scss:w": "node-sass -w --include-path styles styles/app.scss .build/css/app.css",
"lite": "lite-server -c bs-config.json",
"typings": "typings",
"postinstall": "typings install"
},
with the following bs-config.json file:
{
"notify": false,
"files": ["./.build/css/*.css", "./.build/js/**/*.js", "./app/**/*.{html,css}", "index.html"],
"injectChanges": true,
"logLevel": "silent",
"debugInfo": false,
"ghostMode": false,
"server": { "baseDir": "." }
}
Upon starting I see that the bs-config.json configuration is written to te console:
** browser-sync config **
[2] { injectChanges: true,
[2] files:
[2] [ './.build/css/*.css',
[2] './.build/js/**/*.js',
[2] './app/**/*.{html,css}',
[2] 'index.html' ],
[2] watchOptions: { ignored: 'node_modules' },
[2] server: { baseDir: '.', middleware: [ [Function], [Function] ] },
[2] notify: false,
[2] logLevel: 'silent',
[2] debugInfo: false,
[2] ghostMode: false }
[0] 8:02:46 AM - Compilation complete. Watching for file changes.
Since the logLevel is set to silent, I expect to see very little info in the console. However, each and every get is displayed:
[2] 16.04.23 08:02:50 200 GET /index.html
[2] 16.04.23 08:02:50 304 GET /node_modules/bootstrap/dist/css/bootstrap.min.css
[2] 16.04.23 08:02:50 304 GET /node_modules/font-awesome/css/font-awesome.min.css
[2] 16.04.23 08:02:50 304 GET /node_modules/ng2-notify/dist/css/ng2notify.css
[2] 16.04.23 08:02:50 304 GET /.build/css/app.css
[2] 16.04.23 08:02:50 304 GET /node_modules/es6-shim/es6-shim.min.js
[2] 16.04.23 08:02:50 304 GET /node_modules/angular2/bundles/angular2-polyfills.js
[2] 16.04.23 08:02:50 304 GET /node_modules/systemjs/dist/system-polyfills.js
[2] 16.04.23 08:02:50 304 GET /node_modules/angular2/es6/dev/src/testing/shims_for_IE.js
[2] 16.04.23 08:02:50 304 GET /node_modules/systemjs/dist/system.src.js
[2] 16.04.23 08:02:50 304 GET /node_modules/rxjs/bundles/Rx.js
[2] 16.04.23 08:02:50 304 GET /node_modules/angular2/bundles/angular2.dev.js
etc...
Environment
lite-server
version: 2.2.0nodejs
version: 5.7.1npm
version: 3.8.0- OS type/version: OSX
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:8
Top Results From Across the Web
Reducing the console output of LaTeX - TeX
Either use the -interaction batchmode switch or put \batchmode at the start of the document(or anywhere you want to stop displaying output).
Read more >Disable verbose output on build - Stack Overflow
To exclude only path , you would need to modify the Packages/Default/exec.py file. Under the ExecCommand class, run method, look for self.
Read more >Discarding Output - powershell.one
To silence direct console output and discard all output, you can temporarily disable the internal PowerShell command Out-Default .
Read more >Toggle debug, verbose and information level output on and off ...
Toggle $DebugPreference, $VerbosePreference and $InformationPreference in PowerShell between Continue and Silently Continue with a ...
Read more >Stop all output messages to console - PyMC Discourse
... way to stop all of the output, to the console, that comes from pymc3? I've turned off progressbar and tried verbose=0 and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If you do not want to see all HTTP requests, you will need to disable the logging middleware as described in README.md.
So in stead of a
bs-config.json
, use abs-config.js
file like this one:the
0:null
clears out the first middleware, which is the logger. You might still want to set the logLevel to “silent” or “debug” as well, since browsersync by itself can be quite verbose as wellPersonally I wanted to keep the middleware logger, but hide the success response. So I finally use
npm start |grep -v "200" |grep -v "304"