How to use the screwdriver-logger.info function in screwdriver-logger

To help you get started, we’ve selected a few screwdriver-logger 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 screwdriver-cd / screwdriver / plugins / webhooks / index.js View on Github external
delete newAdmins[username];
            // This is needed to make admins dirty and update db
            pipeline.admins = newAdmins;

            return pipeline.update();
        }
        // Add user as admin if permissions good and does not already exist
        if (!pipeline.admins[username]) {
            newAdmins[username] = true;
            // This is needed to make admins dirty and update db
            pipeline.admins = newAdmins;

            return pipeline.update();
        }
    } catch (err) {
        logger.info(err.message);
    }

    return Promise.resolve();
}
github screwdriver-cd / screwdriver / plugins / shutdown.js View on Github external
const gracefulStop = async () => {
        try {
            logger.info('gracefully shutting down server');
            await server.root.stop({
                timeout: 5000
            });
            process.exit(0);
        } catch (err) {
            logger.error(err);
            process.exit(1);
        }
    };
github screwdriver-cd / screwdriver / lib / server.js View on Github external
task: () => new Promise(async (resolve) => {
                        await server.app.jobFactory.cleanUp();
                        logger.info('completed clean up tasks');
                        resolve();
                    })
                });
github screwdriver-cd / screwdriver / plugins / shutdown.js View on Github external
const onSigterm = async () => {
        try {
            logger.info('got SIGTERM; running triggers before shutdown');
            const res = await promiseTimeout(taskHandler(), options.terminationGracePeriod * 1000);

            if (res) {
                logger.error(res);
            }
            await gracefulStop();
        } catch (err) {
            logger.error(err);
        }
    };

screwdriver-logger

Provides common logger for Screwdriver components

BSD-3-Clause
Latest version published 2 years ago

Package Health Score

48 / 100
Full package analysis