Skip to content

Commit

Permalink
remove file from pre-defined appenders.
Browse files Browse the repository at this point in the history
file name is required. let users to setup everything
  • Loading branch information
mshustov committed Feb 12, 2020
1 parent bf3215a commit 96f1edb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 24 deletions.
19 changes: 2 additions & 17 deletions src/core/server/logging/logging_config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ test('`getLoggerContext()` returns correct joined context name.', () => {
test('correctly fills in default config.', () => {
const configValue = new LoggingConfig(config.schema.validate({}));

expect(configValue.appenders.size).toBe(3);
expect(configValue.appenders.size).toBe(2);

expect(configValue.appenders.get('default')).toEqual({
kind: 'console',
Expand All @@ -69,10 +69,6 @@ test('correctly fills in default config.', () => {
kind: 'console',
layout: { kind: 'pattern', highlight: true },
});
expect(configValue.appenders.get('file')).toEqual({
kind: 'file',
layout: { kind: 'pattern', highlight: false },
});
});

test('correctly fills in custom `appenders` config.', () => {
Expand All @@ -83,16 +79,11 @@ test('correctly fills in custom `appenders` config.', () => {
kind: 'console',
layout: { kind: 'pattern' },
},
file: {
kind: 'file',
layout: { kind: 'pattern' },
path: 'path',
},
},
})
);

expect(configValue.appenders.size).toBe(3);
expect(configValue.appenders.size).toBe(2);

expect(configValue.appenders.get('default')).toEqual({
kind: 'console',
Expand All @@ -103,12 +94,6 @@ test('correctly fills in custom `appenders` config.', () => {
kind: 'console',
layout: { kind: 'pattern' },
});

expect(configValue.appenders.get('file')).toEqual({
kind: 'file',
layout: { kind: 'pattern' },
path: 'path',
});
});

test('correctly fills in default `loggers` config.', () => {
Expand Down
7 changes: 0 additions & 7 deletions src/core/server/logging/logging_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,6 @@ export class LoggingConfig {
layout: { kind: 'pattern', highlight: true },
} as AppenderConfigType,
],
[
'file',
{
kind: 'file',
layout: { kind: 'pattern', highlight: false },
} as AppenderConfigType,
],
]);

/**
Expand Down

0 comments on commit 96f1edb

Please sign in to comment.