Merge pull request #5269 from antobinary/log-node-version
Log nodejs version for debugging purposes. Resolve "CLIENT LOG: [object Object]"
This commit is contained in:
commit
f1cfc7a49f
@ -1,7 +1,11 @@
|
||||
import Logger from '/imports/startup/server/logger';
|
||||
|
||||
const logClient = (type, log, ...args) => {
|
||||
Logger.log(type, `CLIENT LOG: ${log}\n`, ...args);
|
||||
if (typeof log === 'string' || log instanceof String) {
|
||||
Logger.log(type, `CLIENT LOG: ${log}\n`, ...args);
|
||||
} else {
|
||||
Logger.log(type, `CLIENT LOG: ${JSON.stringify(log)}\n`, ...args);
|
||||
}
|
||||
};
|
||||
|
||||
export default logClient;
|
||||
|
@ -6,7 +6,8 @@ import Redis from './redis';
|
||||
|
||||
Meteor.startup(() => {
|
||||
const APP_CONFIG = Meteor.settings.public.app;
|
||||
Logger.info(`SERVER STARTED. DEV_ENV=${Meteor.isDevelopment} PROD_ENV=${Meteor.isProduction}`, APP_CONFIG);
|
||||
const env = Meteor.isDevelopment ? 'development' : 'production';
|
||||
Logger.warn(`SERVER STARTED. ENV=${env}, nodejs version=${process.version}`, APP_CONFIG);
|
||||
});
|
||||
|
||||
WebApp.connectHandlers.use('/check', (req, res) => {
|
||||
|
Loading…
Reference in New Issue
Block a user