@@ -4,6 +4,7 @@ var util = require('./lib/util')
44var login = require ( './lib/util/login' )
55var { addlogs} = require ( './lib/util/log' )
66const chalk = require ( 'chalk' )
7+ let path = require ( 'path' )
78
89exports . initial = function ( config ) {
910 config = util . buildAppConfig ( config )
@@ -36,10 +37,11 @@ var singleExport = (moduleName, types, config) => {
3637 var exportedModule = require ( './lib/export/' + moduleName )
3738 exportedModule . start ( config ) . then ( function ( ) {
3839 addlogs ( config , moduleName + ' was exported successfully!' , 'success' )
40+ addlogs ( config , 'The log for this is stored at ' + path . join ( config . data , 'logs' , 'export' ) , 'success' )
3941 } ) . catch ( function ( error ) {
4042 addlogs ( config , 'Failed to migrate ' + moduleName , 'error' )
4143 addlogs ( config , error , 'error' )
42- addlogs ( config , 'The log for this is stored at ' + config . data + '/ logs', 'success ' )
44+ addlogs ( config , 'The log for this is stored at ' + path . join ( config . data , ' logs', 'export' ) , 'error ')
4345 } )
4446 } else {
4547 addlogs ( config , 'Please provide valid module name.' , 'error' )
@@ -64,9 +66,9 @@ var allExport = async (config, types) => {
6466 concurrency : 1 ,
6567 } ) . then ( function ( ) {
6668 addlogs ( config , chalk . green ( 'Stack: ' + config . source_stack + ' has been exported succesfully!' ) , 'success' )
67- addlogs ( config , 'The log for this is stored at ' + config . data + '/ logs', 'success' )
69+ addlogs ( config , 'The log for this is stored at ' + path . join ( config . data , ' logs', 'export' ) , 'success' )
6870 } ) . catch ( function ( ) {
6971 addlogs ( config , chalk . red ( 'Failed to migrate stack: ' + config . source_stack + '. Please check error logs for more info' ) , 'error' )
70- addlogs ( config , 'The log for this is stored at ' + config . data + '/ logs', 'success ' )
72+ addlogs ( config , 'The log for this is stored at ' + path . join ( config . data , ' logs', 'export' ) , 'error ')
7173 } )
7274}
0 commit comments