Skip to content

Commit 7190f10

Browse files
authored
HCK-11091: Move the log of the start to the studio (#189)
1 parent bf87e8d commit 7190f10

File tree

4 files changed

+0
-79
lines changed

4 files changed

+0
-79
lines changed

forward_engineering/api.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ const { commentDropStatements } = require('./helpers/commentHelpers/commentDropS
33
const { DROP_STATEMENTS } = require('./helpers/constants');
44
const { getAlterScript } = require('./helpers/alterScriptFromDeltaHelper');
55
const { applyToInstance } = require('./helpers/applyToInstanceHelper');
6-
const { getSystemInfo } = require('../reverse_engineering/helpers/loggerHelper');
76
const reApi = require('../reverse_engineering/api');
87

98
module.exports = {
@@ -46,15 +45,6 @@ module.exports = {
4645
},
4746

4847
applyToInstance(connectionInfo, logger, callback, app) {
49-
logger.clear();
50-
logger.log('info', getSystemInfo(connectionInfo.appVersion), 'Apply to instance');
51-
logger.log(
52-
'info',
53-
_.omit(connectionInfo, 'script', 'containerData'),
54-
'connectionInfo',
55-
connectionInfo.hiddenKeys,
56-
);
57-
5848
applyToInstance(connectionInfo, logger, app)
5949
.then(result => {
6050
callback(null, result);

reverse_engineering/api.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
'use strict';
2-
31
const _ = require('lodash');
42
const snowflakeHelper = require('./helpers/snowflakeHelper');
53
const ssoHelper = require('./helpers/ssoHelper');
64

75
const connect = async (connectionInfo, logger, cb) => {
8-
logger.clear();
9-
logger.log('info', connectionInfo, 'connectionInfo', connectionInfo.hiddenKeys);
106
try {
117
await snowflakeHelper.connect(logger, connectionInfo);
128
cb();
@@ -25,8 +21,6 @@ const disconnect = async (connectionInfo, logger, cb) => {
2521
};
2622

2723
const testConnection = async (connectionInfo, logger, cb, app) => {
28-
logger.clear();
29-
logger.log('info', connectionInfo, 'connectionInfo', connectionInfo.hiddenKeys);
3024
try {
3125
if (connectionInfo.authType === 'externalbrowser') {
3226
await getExternalBrowserUrl(connectionInfo, logger, cb);
@@ -58,7 +52,6 @@ const getDocumentKinds = (connectionInfo, logger, cb) => {
5852

5953
const getDbCollectionsNames = async (connectionInfo, logger, cb) => {
6054
try {
61-
logger.clear();
6255
await snowflakeHelper.connect(logger, connectionInfo);
6356
const databaseName = connectionInfo.databaseName;
6457
const schemasInfo = await snowflakeHelper.getSchemasInfo({ databaseName });
@@ -75,7 +68,6 @@ const getDbCollectionsNames = async (connectionInfo, logger, cb) => {
7568

7669
const getDbCollectionsData = async (data, logger, cb) => {
7770
try {
78-
logger.log('info', data, 'Retrieving schema', data.hiddenKeys);
7971
const collections = data.collectionData.collections;
8072
const dataBaseNames = data.collectionData.dataBaseNames;
8173
const entitiesPromises = await dataBaseNames.reduce(async (packagesPromise, schema) => {

reverse_engineering/helpers/loggerHelper.js

Lines changed: 0 additions & 48 deletions
This file was deleted.

reverse_engineering/helpers/snowflakeHelper.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,6 @@ const connect = async (
5353
const accessUrl = getAccessUrl(account);
5454
const timeout = _.toNumber(queryRequestTimeout) || 2 * 60 * 1000;
5555

56-
logger.log(
57-
'info',
58-
`Connection name: ${name}\n` +
59-
`Cloud platform: ${cloudPlatform}\n` +
60-
`Host: ${host}\n` +
61-
`Auth type: ${authType}\n` +
62-
`Username: ${username}\n` +
63-
`Warehouse: ${warehouse}\n` +
64-
`Role: ${role}\n` +
65-
`Database name: ${databaseName}`,
66-
'Connection',
67-
);
68-
6956
const connectionFallbackStrategy = err => {
7057
if (err.code !== CANT_REACH_SNOWFLAKE_ERROR_STATUS || hasCloudPlatform(account)) {
7158
throw err;

0 commit comments

Comments
 (0)