New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

containership.plugin.logs

Package Overview
Dependencies
Maintainers
3
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

containership.plugin.logs - npm Package Compare versions

Comparing version 1.1.3 to 1.1.4

49

application.js

@@ -5,5 +5,5 @@ 'use strict';

const _ = require('lodash');
const ContainershipPlugin = require('containership.plugin');
const APPLICATION_NAME = 'containership-logs';

@@ -13,14 +13,15 @@ module.exports = new ContainershipPlugin({

initialize: function(core) {
const DEFAULT_LOG_PATH = core.options['base-log-dir'] || '/var/log/containership';
const application_name = 'containership-logs';
core.logger.register(application_name);
runFollower: (core) => {
core.loggers[APPLICATION_NAME].log('verbose', `${APPLICATION_NAME} does not run on follower nodes.`);
},
runLeader: (core) => {
const add_application = () => {
const DEFAULT_LOG_PATH = core.options['base-log-dir'] || '/var/log/containership';
core.cluster.myriad.persistence.get(
[core.constants.myriad.APPLICATION_PREFIX, application_name].join(core.constants.myriad.DELIMITER),
[core.constants.myriad.APPLICATION_PREFIX, APPLICATION_NAME].join(core.constants.myriad.DELIMITER),
(err) => {
if(err) {
return core.applications.add({
id: application_name,
id: APPLICATION_NAME,
image: 'containership/docker-cs-logs:latest',

@@ -35,3 +36,3 @@ cpus: 0.1,

metadata: {
plugin: application_name,
plugin: APPLICATION_NAME,
ancestry: 'containership.plugin'

@@ -50,7 +51,7 @@ }

}, () => {
core.loggers[application_name].log('verbose', ['Created ', application_name, '!'].join(''));
core.loggers[APPLICATION_NAME].log('verbose', `Created ${APPLICATION_NAME}!`);
});
}
return core.loggers[application_name].log('verbose', [application_name, 'already exists, skipping create!'].join(' '));
return core.loggers[APPLICATION_NAME].log('verbose', `${APPLICATION_NAME} already exists, skipping create!`);
}

@@ -60,19 +61,21 @@ );

if('leader' === core.options.mode) {
if(core.cluster.praetor.is_controlling_leader()) {
add_application();
}
if(core.cluster.praetor.is_controlling_leader()) {
add_application();
}
core.cluster.legiond.on('promoted', () => {
core.cluster.myriad.persistence.keys(core.constants.myriad.APPLICATIONS, (err, applications) => {
if(err || !_.isEmpty(applications)) {
return add_application();
}
core.cluster.legiond.on('myriad.bootstrapped', () => {
add_application();
});
return setTimeout(add_application, 2000);
});
});
return logs.Init(core).register_routes();
},
return logs.Init(core).register_routes();
initialize: function(core) {
core.logger.register(APPLICATION_NAME);
if(core.options.mode === 'leader') {
return module.exports.runLeader(core);
}
return module.exports.runFollower(core);
},

@@ -79,0 +82,0 @@

@@ -113,2 +113,3 @@ 'use strict';

res.header('Connection', 'keep-alive');
res.header('X-Accel-Buffering', 'no');
res.status(200);

@@ -115,0 +116,0 @@

{
"name": "containership.plugin.logs",
"version": "1.1.3",
"version": "1.1.4",
"dependencies": {

@@ -5,0 +5,0 @@ "acorn": {

{
"name": "containership.plugin.logs",
"version": "1.1.3",
"version": "1.1.4",
"description": "Official logging plugin for ContainerShip",

@@ -5,0 +5,0 @@ "main": "application.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc