fix use before definition

pull/1/head
ansuz 6 years ago
parent 8c757019e2
commit b3e0f9e886

@ -79,6 +79,9 @@ Logger.create = function (config, cb) {
config.logLevel = 'info'; config.logLevel = 'info';
} }
var date = new Date();
var launchTime = ('' + date.getUTCFullYear()).slice(-2) + date.toISOString();
var ctx = { var ctx = {
channelName: launchTime, channelName: launchTime,
logFeedback: Boolean(config.logFeedback), logFeedback: Boolean(config.logFeedback),
@ -90,9 +93,6 @@ Logger.create = function (config, cb) {
return void cb(Object.freeze(createMethods(ctx))); return void cb(Object.freeze(createMethods(ctx)));
} }
var date = new Date();
var launchTime = ('' + date.getUTCFullYear()).slice(-2) + date.toISOString();
Store.create({ Store.create({
filePath: config.logPath, filePath: config.logPath,
}, function (store) { }, function (store) {

Loading…
Cancel
Save