Skip to content

Commit

Permalink
backend-common: silenced and simplified void logger
Browse files Browse the repository at this point in the history
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
  • Loading branch information
Rugvip committed Mar 25, 2022
1 parent 069d692 commit bae9359
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/strange-wasps-whisper.md
@@ -0,0 +1,5 @@
---
'@backstage/backend-common': patch
---

The logger returned from `getVoidLogger` is now uses a silenced console transport instead.
3 changes: 1 addition & 2 deletions packages/backend-common/src/logging/voidLogger.ts
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/

import { PassThrough } from 'stream';
import * as winston from 'winston';

/**
Expand All @@ -24,6 +23,6 @@ import * as winston from 'winston';
*/
export function getVoidLogger(): winston.Logger {
return winston.createLogger({
transports: [new winston.transports.Stream({ stream: new PassThrough() })],
transports: [new winston.transports.Console({ silent: true })],
});
}

0 comments on commit bae9359

Please sign in to comment.