@@ -29,6 +29,7 @@ class << self
2929 def call ( params )
3030 results = [ ]
3131
32+ GoodData . logger . info 'Starting ImportObjectCollections action'
3233 client = params . gdc_gd_client
3334 development_client = params . development_client
3435 number_of_threads = Integer ( params . number_of_threads || '8' )
@@ -45,7 +46,9 @@ def call(params)
4546 to_project = client . projects ( pid ) || fail ( "Invalid 'to' project specified - '#{ pid } '" )
4647
4748 if transfer_uris . any?
49+ logging_data ( from , pid , transfer_uris , true )
4850 from_project . partial_md_export ( transfer_uris , project : to_project )
51+ logging_data ( from , pid , transfer_uris , false )
4952 end
5053
5154 results << {
@@ -58,6 +61,20 @@ def call(params)
5861
5962 results
6063 end
64+
65+ private
66+
67+ def logging_data ( from_project , to_project , transfer_uris , start_action )
68+ if start_action
69+ # Logging to execution log
70+ GoodData . logger . info "Starting import objects, from_project: #{ from_project } , to_project: #{ to_project } "
71+ # Logging to Splunk log
72+ GoodData . gd_logger . info "Starting import objects, action=objects_import, from_project=#{ from_project } , to_project=#{ to_project } , transfer_uris=#{ transfer_uris } "
73+ else
74+ GoodData . logger . info "Success import objects, from_project: #{ from_project } , to_project: #{ to_project } "
75+ GoodData . gd_logger . info "Success import objects, action=objects_import, from_project=#{ from_project } , to_project=#{ to_project } "
76+ end
77+ end
6178 end
6279 end
6380 end
0 commit comments