How to use the ghost-ignition.logging function in ghost-ignition

To help you get started, we’ve selected a few ghost-ignition 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 gazooka / GhostInAzureWebApp / postinstall.js View on Github external
var config = require('ghost/core/server/config');
var deasync = require('deasync');
var fs = require('fs');
var knexMigrator = require('knex-migrator');
var logging = require('ghost-ignition').logging();
var path = require('path');
var replaceInFile = require('replace-in-file');
var strReplaceAll = require('str-replace-all');
var uglifyJs = require('uglify-es');
var zlib = require('zlib');

// to hold the generated server cache
var serverCacheItems = [];
var serverCacheFilesProcessed = [];

// files being processed
var configProductionJsonPath = path.resolve(__dirname, 'config.production.json');
var knexMigratorPath = path.resolve(__dirname, 'node_modules/ghost');
var serverJsPath = path.resolve(__dirname, 'server.js');
var serverCacheJsPath = path.resolve(__dirname, 'server.cache.js');
var serverCacheJsZippedPath = path.resolve(__dirname, 'server.cache.js.gz');
github gazooka / GhostInAzureWebApp / dbinit.js View on Github external
// let users know which database is being initialised
var logging = require('ghost-ignition').logging();
var config = require('ghost/core/server/config');
logging.info('Initialising ' + config.get('env'));

// if we're running in Azure and not configuring production, warn the user
if ((process.env.REGION_NAME) && (process.env.WEBSITE_SKU) && (!process.env.EMULATED) && (config.get('env') !== 'production')) {
	logging.warn('Appear to be running in Azure but not configuring production database');
};

// re-initialise database by resetting it and then initialising it
var KnexMigrator = require('knex-migrator');
knexMigrator = new KnexMigrator({
    knexMigratorFilePath: __dirname + '\\node_modules\\ghost'
});

logging.info('Resetting ' + config.get('env'));
knexMigrator.reset()
github TryGhost / gscan / app / logging.js View on Github external
var config = require('ghost-ignition').config();

// see defaults in GhostLogger
var logging = require('ghost-ignition').logging({
    path: config.get('logging:path'),
    domain: config.get('logging:domain'),
    mode: config.get('logging:mode'),
    level: config.get('logging:level'),
    transports: config.get('logging:transports')
});

module.exports = logging;
github gazooka / GhostInAzureWebApp / dbmigrate.js View on Github external
// let users know which database is being initialised
var logging = require('ghost-ignition').logging();
var config = require('ghost/core/server/config');
logging.info('Migrating ' + config.get('env'));

// if we're running in Azure and not configuring production, warn the user
if ((process.env.REGION_NAME) && (process.env.WEBSITE_SKU) && (!process.env.EMULATED) && (config.get('env') !== 'production')) {
	logging.warn('Appear to be running in Azure but not configuring production database');
};

// migrate database to latest version
var KnexMigrator = require('knex-migrator');
knexMigrator = new KnexMigrator({
    knexMigratorFilePath: __dirname + '\\node_modules\\ghost'
});

knexMigrator.migrate()
	.then(function onMigrateSuccess() {
github TryGhost / Ghost / core / server / lib / common / logging.js View on Github external
const config = require('../../config'),
    {logging} = require('ghost-ignition');

module.exports = logging({
    name: config.get('logging:name'),
    env: config.get('env'),
    path: config.get('logging:path') || config.getContentPath('logs'),
    domain: config.get('url'),
    mode: config.get('logging:mode'),
    level: config.get('logging:level'),
    transports: config.get('logging:transports'),
    gelf: config.get('logging:gelf'),
    loggly: config.get('logging:loggly'),
    rotation: config.get('logging:rotation')
});
github chadly / ghost / core / server / lib / common / logging.js View on Github external
var config = require('../../config'),
    logging = require('ghost-ignition').logging;

module.exports = logging({
    env: config.get('env'),
    path: config.get('logging:path') || config.getContentPath('logs'),
    domain: config.get('url'),
    mode: config.get('logging:mode'),
    level: config.get('logging:level'),
    transports: config.get('logging:transports'),
    loggly: config.get('logging:loggly'),
    rotation: config.get('logging:rotation')
});