How to use the cf-nodejs-logging-support.info function in cf-nodejs-logging-support

To help you get started, we’ve selected a few cf-nodejs-logging-support examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SAP / cf-nodejs-logging-support / sample / cf-nodejs-shoutboard / web-restify.js View on Github external
// parse body json params
app.use(restify.plugins.bodyParser({ mapParams: true }));

// set port and run server
var port = Number(process.env.VCAP_APP_PORT || 8080);
app.listen(port, function () {
    log.info("listening on port: %d", port);
});

// log some custom fields
var stats = {
    node_version: process.version,
    pid: process.pid,
    platform: process.platform,
};
log.info("runtime statistics", stats);

// handling post messages
app.post("/post_message", function (req, res, next) {
    var msg = {
        name: req.body.name,
        time: req.body.time,
        message: req.body.message,
        timestamp: (new Date()).getTime()
    };

    req.logger.info("received message from %s", msg.name);

    if (redisRunning) {
        pub.publish("message", JSON.stringify(msg));
    } else {
        pushLocal(msg);
github SAP / cf-nodejs-logging-support / sample / cf-nodejs-shoutboard / web-express.js View on Github external
// host static files
app.use("/", express.static(__dirname + "/public"));

// set port and run server
var port = Number(process.env.VCAP_APP_PORT || 8080);
app.listen(port, function () {
    log.info("listening on port: %d", port);
});

// log some custom fields
var stats = {
    node_version: process.version,
    pid: process.pid,
    platform: process.platform,
};
log.info("runtime statistics", stats);

// handling post messages
app.post("/post_message", function (req, res) {
    var msg = {
        name: req.body.name,
        time: req.body.time,
        message: req.body.message,
        timestamp: (new Date()).getTime()
    };

    req.logger.info("received message from %s", msg.name);

    if (redisRunning) {
        pub.publish("message", JSON.stringify(msg));
    } else {
        pushLocal(msg);
github SAP / cf-nodejs-logging-support / sample / cf-nodejs-shoutboard / web-express.js View on Github external
app.listen(port, function () {
    log.info("listening on port: %d", port);
});
github SAP / cf-nodejs-logging-support / sample / cf-nodejs-shoutboard / web-restify.js View on Github external
app.listen(port, function () {
    log.info("listening on port: %d", port);
});