BrowserSync / UI

User interface for BrowserSync
Apache License 2.0
333 stars 43 forks source link

[Feature request] request logging in the UI #56

Open treffynnon opened 6 years ago

treffynnon commented 6 years ago

Whilst debugging a recent issue I realised it would be an immense help to have request logging in the UI - something in a similar vein to chrome://net-internals but for requests proxied or served by browsersync.

chrome://net-internals

Currently, you can achieve some request logging with the following:

const browserSyncPort = portfinderSync(3001);
const bs = browserSync.create();
bs.init({
    logLevel: 'debug',
    logConnections: true,
    logFileChanges: true,
    port: browserSyncPort,
    ui: {
        port: portfinderSync(browserSyncPort + 1),
    },
    proxy: {
        target: 'somehost.name',
        middleware: [require('connect-logger')(), webpackDevMiddleware, webpackHotMiddleware],
    },
}, done);

Which is great, but it does get a little hard to follow when you've also got the build process spitting out logs into the same STDOUT.