Skip to content

Commit

Permalink
Removes server logs from legacy
Browse files Browse the repository at this point in the history
  • Loading branch information
TinaHeiligers committed Mar 15, 2021
1 parent 1adb68f commit 63e4fe6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
16 changes: 1 addition & 15 deletions src/legacy/server/kbn_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,20 +98,13 @@ export default class KbnServer {
async listen() {
await this.ready();

const { server, config } = this;
const { server } = this;

if (process.env.isDevCliChild) {
// help parent process know when we are ready
process.send(['SERVER_LISTENING']);
}

server.log(
['listening', 'info'],
`Server running at ${server.info.uri}${
config.get('server.rewriteBasePath') ? config.get('server.basePath') : ''
}`
);

return server;
}

Expand All @@ -137,13 +130,6 @@ export default class KbnServer {
const loggingConfig = config.get('logging');
const opsConfig = config.get('ops');

const subset = {
ops: opsConfig,
logging: loggingConfig,
};
const plain = JSON.stringify(subset, null, 2);
this.server.log(['info', 'config'], 'New logging configuration:\n' + plain);

reconfigureLogging(this.server, loggingConfig, opsConfig.interval);
}
}
6 changes: 2 additions & 4 deletions src/legacy/server/logging/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@
* Side Public License, v 1.
*/

import { setupLogging, setupLoggingRotate, attachMetaData } from '@kbn/legacy-logging';
import { setupLogging, setupLoggingRotate } from '@kbn/legacy-logging';

export async function loggingMixin(kbnServer, server, config) {
server.decorate('server', 'logWithMetadata', (tags, message, metadata = {}) => {
server.log(tags, attachMetaData(message, metadata));
});
server.decorate('server', 'logWithMetadata');

const loggingConfig = config.get('logging');
const opsInterval = config.get('ops.interval');
Expand Down

0 comments on commit 63e4fe6

Please sign in to comment.