Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { name, version, homepage } from '../../package.json'
import Logger from 'js-logger'
import './polyfills.js'
import runtime from './runtime.js'
// Bootstrap logger
Logger.useDefaults()
// print header to console in browser environment
if (runtime.isBrowser) {
console.log(homepage+' '+version+' (@'+GIT_BRANCH+' #'+GIT_COMMIT.substr(0,7)+' '+BUILD_DATE+')' )
}
// global dependencies
// three.js
if (runtime.isNode) global.THREE = require('three')
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/*
* BOF: src/domain/logger.js
* This file defines our 'logger' middleware.
*/
// @flow
import Logger from "js-logger";
// Initialise logger.
Logger.useDefaults();
// Export getLogger as an importable function
export function getLogger(name : string) : Logger {
return Logger.get(name);
}
/*
* EOF: src/domain/logger.js
*/
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import Cookie from 'js-cookie';
import Raven from 'raven-js';
import Logger from 'js-logger';
import { AppContainer } from 'react-hot-loader';
import LocaleProvider from 'antd/lib/locale-provider';
import message from 'antd/lib/message';
import enUS from 'antd/lib/locale-provider/en_US';
import { history } from './routes';
import pkg from '../package.json';
import getStore from './store';
import AppHost from './AppHost';
Logger.useDefaults();
const store = getStore();
if (window.ga) {
window.ga('set', 'appVersion', pkg.version);
}
const logPageView = () => {
if (window.ga) {
window.ga('set', 'page', window.location.pathname);
window.ga('send', 'pageview');
}
};
if (process.env.SENTRY_PUBLIC_DSN) {
Raven.config(process.env.SENTRY_PUBLIC_DSN).install();
/*
* Rakuten React kit
*
* Copyright © 2016 Rakuten, Inc. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import Logger from 'js-logger';
Logger.useDefaults();
export function getLogger(name: string) {
return Logger.get(name);
}
import Logger from 'js-logger';
import { ILogger } from '../types/logger';
Logger.useDefaults();
export const logger: ILogger = Logger;