Skip to content

Commit d23ac26

Browse files
authored
HCK-11091: Move the log of the start of FE/RE to the studio (#148)
* HCK-11091: Move the log of the start to the studio * HCK-11091: Move the log of the start to the studio
1 parent a3228a8 commit d23ac26

File tree

3 files changed

+0
-46
lines changed

3 files changed

+0
-46
lines changed

forward_engineering/api.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ module.exports = {
1111
isDropInStatements,
1212

1313
applyToInstance(connectionInfo, logger, callback, app) {
14-
logger.clear();
15-
logger.log('info', connectionInfo, 'connectionInfo', connectionInfo.hiddenKeys);
16-
1714
applyToInstance(connectionInfo, logger, app)
1815
.then(result => {
1916
callback(null, result);

reverse_engineering/api.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
const cassandraHelper = require('./cassandraHelper');
22
const systemKeyspaces = require('./package').systemKeyspaces;
3-
const logHelper = require('./logHelper');
43
const commandsService = require('./commandsService');
54
const async = require('async');
65
const fs = require('fs');
@@ -69,8 +68,6 @@ module.exports = {
6968
},
7069

7170
testConnection: function (connectionInfo, logger, cb, app) {
72-
logInfo('Test connection', connectionInfo, logger);
73-
7471
this.connect(
7572
connectionInfo,
7673
logger,
@@ -92,7 +89,6 @@ module.exports = {
9289
getDbCollectionsNames: function (connectionInfo, logger, cb, app) {
9390
initPluginConfiguration(connectionInfo.pluginConfiguration, logger);
9491

95-
logInfo('Retrieving keyspaces and tables information', connectionInfo, logger);
9692
const { includeSystemCollection } = connectionInfo;
9793
const cassandra = cassandraHelper();
9894

@@ -145,8 +141,6 @@ module.exports = {
145141
initPluginConfiguration(data.pluginConfiguration, logger);
146142

147143
const cassandra = cassandraHelper();
148-
logger.log('info', data, 'Retrieving schema', data.hiddenKeys);
149-
150144
const tables = data.collectionData.collections;
151145
const keyspacesNames = data.collectionData.dataBaseNames;
152146
const includeEmptyCollection = data.includeEmptyCollection;
@@ -283,12 +277,6 @@ module.exports = {
283277
},
284278
};
285279

286-
const logInfo = (step, connectionInfo, logger) => {
287-
logger.clear();
288-
logger.log('info', logHelper.getSystemInfo(connectionInfo.appVersion), step);
289-
logger.log('info', connectionInfo, 'connectionInfo', connectionInfo.hiddenKeys);
290-
};
291-
292280
const progress = (logger, keyspace, table, message) => {
293281
logger.progress({
294282
containerName: keyspace,

reverse_engineering/logHelper.js

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -22,36 +22,6 @@ const checkConnection = (host, port, timeout = 5000) =>
2222

2323
const getPluginVersion = () => packageFile.version;
2424

25-
const getSystemInfo = appVersion => {
26-
return (
27-
'' +
28-
`Date: ${new Date()}` +
29-
'\n' +
30-
`Application version: ${appVersion}` +
31-
'\n' +
32-
`Plugin version: ${getPluginVersion()}` +
33-
'\n\n' +
34-
`System information:` +
35-
'\n' +
36-
` Hostname: ${os.hostname()}` +
37-
'\n' +
38-
` Platform: ${os.platform()} ${os.arch()}` +
39-
'\n' +
40-
` Release: ${os.release()}` +
41-
'\n' +
42-
` Uptime: ${toTime(os.uptime())}` +
43-
'\n' +
44-
` Total RAM: ${(os.totalmem() / 1073741824).toFixed(2)} GB` +
45-
'\n' +
46-
` CPU Model: ${os.cpus()[0].model}` +
47-
'\n' +
48-
` CPU Clock: ${maxClock(os.cpus())} MHZ` +
49-
'\n' +
50-
` CPU Cores: ${os.cpus().length} cores` +
51-
'\n\n'
52-
);
53-
};
54-
5525
const maxClock = cpus => {
5626
return cpus.reduce((highestClock, cpu) => Math.max(highestClock, cpu.speed), 0);
5727
};
@@ -63,7 +33,6 @@ const toTime = number => {
6333
};
6434

6535
const logHelper = {
66-
getSystemInfo,
6736
checkConnection,
6837
};
6938

0 commit comments

Comments
 (0)