@@ -17,7 +17,9 @@ module.exports = {
17
17
} ,
18
18
19
19
testConnection : async function ( connectionInfo , logger , cb ) {
20
+ logger . clear ( ) ;
20
21
client = setUpDocumentClient ( connectionInfo ) ;
22
+ logger . log ( 'info' , connectionInfo , 'Reverse-Engineering connection settings' , connectionInfo . hiddenKeys ) ;
21
23
try {
22
24
await executeWithTimeout ( getDatabasesData ) ;
23
25
return cb ( ) ;
@@ -28,6 +30,8 @@ module.exports = {
28
30
29
31
getDatabases : async function ( connectionInfo , logger , cb ) {
30
32
client = setUpDocumentClient ( connectionInfo ) ;
33
+ logger . clear ( ) ;
34
+ logger . log ( 'info' , connectionInfo , 'Reverse-Engineering connection settings' , connectionInfo . hiddenKeys ) ;
31
35
32
36
try {
33
37
const dbsData = await getDatabasesData ( ) ;
@@ -42,6 +46,7 @@ module.exports = {
42
46
43
47
getDocumentKinds : async function ( connectionInfo , logger , cb ) {
44
48
client = setUpDocumentClient ( connectionInfo ) ;
49
+ logger . log ( 'info' , connectionInfo , 'Reverse-Engineering connection settings' , connectionInfo . hiddenKeys ) ;
45
50
46
51
try {
47
52
const collections = await listCollections ( connectionInfo . database ) ;
@@ -86,6 +91,8 @@ module.exports = {
86
91
getDbCollectionsNames : async function ( connectionInfo , logger , cb ) {
87
92
try {
88
93
client = setUpDocumentClient ( connectionInfo ) ;
94
+ logger . log ( 'info' , connectionInfo , 'Reverse-Engineering connection settings' , connectionInfo . hiddenKeys ) ;
95
+
89
96
logger . log (
90
97
'info' ,
91
98
{ Database : connectionInfo . database } ,
@@ -115,8 +122,16 @@ module.exports = {
115
122
try {
116
123
logger . progress = logger . progress || ( ( ) => { } ) ;
117
124
client = setUpDocumentClient ( data ) ;
125
+ logger . log ( 'info' , data , 'Reverse-Engineering connection settings' , data . hiddenKeys ) ;
118
126
119
127
const { recordSamplingSettings, fieldInference } = data ;
128
+ logger . log (
129
+ 'info' ,
130
+ getSamplingInfo ( recordSamplingSettings , fieldInference ) ,
131
+ 'Reverse-Engineering sampling params' ,
132
+ data . hiddenKeys ,
133
+ ) ;
134
+
120
135
const bucketList = data . collectionData . dataBaseNames ;
121
136
logger . log ( 'info' , { CollectionList : bucketList } , 'Selected collection list' , data . hiddenKeys ) ;
122
137
@@ -664,6 +679,8 @@ async function getAdditionalAccountInfo(connectionInfo, logger) {
664
679
return { } ;
665
680
}
666
681
682
+ logger . log ( 'info' , { } , 'Account additional info' , connectionInfo . hiddenKeys ) ;
683
+
667
684
try {
668
685
const { clientId, appSecret, tenantId, subscriptionId, resourceGroupName, host } = connectionInfo ;
669
686
const accNameRegex = / h t t p s : \/ \/ ( .+ ) \. d o c u m e n t s .+ / i;
0 commit comments