packages/browser-sync/lib/logger.js
function(bs, data) {
        const type = data.type;
        if (bs.options.get('json')) {
            return console.log(JSON.stringify({
                "service:running": {
                    "options": bs.options.toJS()
                }
            }));
        }
        if (type === "server") {
            var baseDir = bs.options.getIn(["server", "baseDir"]);

            logUrls(bs.options.get("urls").toJS());

            if (baseDir) {
                if (utils.isList(baseDir)) {
                    baseDir.forEach(serveFiles);
                } else {
                    serveFiles(baseDir);
                }
            }
        }

        if (type === "proxy") {
            logger.info(
                "Proxying: {cyan:%s}",
                bs.options.getIn(["proxy", "target"])
            );
            logUrls(bs.options.get("urls").toJS());
        }

        if (type === "snippet") {
            if (bs.options.get("logSnippet")) {
                logger.info(
                    "{bold:Copy the following snippet into your website, " +
                        "just before the closing {cyan:</body>} tag"
                );

                logger.unprefixed("info", messages.scriptTags(bs.options));
            }

            logUrls(
                bs.options
                    .get("urls")
                    .filter(function(value, key) {
                        return key.slice(0, 2) === "ui";
                    })
                    .toJS()
            );
        }

        function serveFiles(base) {
            logger.info("Serving files from: {magenta:%s}", base);
        }
    }
function(bs, data) {
        const type = data.type;
        if (bs.options.get('json')) {
            return console.log(JSON.stringify({
                "service:running": {
                    "options": bs.options.toJS()
                }
            }));
        }
        if (type === "server") {
            var baseDir = bs.options.getIn(["server", "baseDir"]);

            logUrls(bs.options.get("urls").toJS());

            if (baseDir) {
                if (utils.isList(baseDir)) {
                    baseDir.forEach(serveFiles);
                } else {
                    serveFiles(baseDir);
                }
            }
        }

        if (type === "proxy") {
            logger.info(
                "Proxying: {cyan:%s}",
                bs.options.getIn(["proxy", "target"])
            );
            logUrls(bs.options.get("urls").toJS());
        }

        if (type === "snippet") {
            if (bs.options.get("logSnippet")) {
                logger.info(
                    "{bold:Copy the following snippet into your website, " +
                        "just before the closing {cyan:</body>} tag"
                );

                logger.unprefixed("info", messages.scriptTags(bs.options));
            }

            logUrls(
                bs.options
                    .get("urls")
                    .filter(function(value, key) {
                        return key.slice(0, 2) === "ui";
                    })
                    .toJS()
            );
        }

        function serveFiles(base) {
            logger.info("Serving files from: {magenta:%s}", base);
        }
    }
function ( bs , data ) { const type = data . type ; if ( bs . options . get ( 'json' ) ) { return console . log ( JSON . stringify ( { "service:running" : { "options" : bs . options . toJS ( ) } } ) ) ; } if ( type === "server" ) { var baseDir = bs . options . getIn ( [ "server" , "baseDir" ] ) ; logUrls ( bs . options . get ( "urls" ) . toJS ( ) ) ; if ( baseDir ) { if ( utils . isList ( baseDir ) ) { baseDir . forEach ( serveFiles ) ; } else { serveFiles ( baseDir ) ; } } } if ( type === "proxy" ) { logger . info ( "Proxying: {cyan:%s}" , bs . options . getIn ( [ "proxy" , "target" ] ) ) ; logUrls ( bs . options . get ( "urls" ) . toJS ( ) ) ; } if ( type === "snippet" ) { if ( bs . options . get ( "logSnippet" ) ) { logger . info ( "{bold:Copy the following snippet into your website, " + "just before the closing {cyan:</body>} tag" ) ; logger . unprefixed ( "info" , messages . scriptTags ( bs . options ) ) ; } logUrls ( bs . options . get ( "urls" ) . filter ( function ( value , key ) { return key . slice ( 0 , 2 ) === "ui" ; } ) . toJS ( ) ) ; } function serveFiles ( base ) { logger . info ( "Serving files from: {magenta:%s}" , base ) ; } }
Main logging when the service is running
@param {BrowserSync} bs
@param data
Main logging when the service is running