backend-common: silenced and simplified void logger

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2022-01-31 02:23:59 +01:00
parent 069d69290c
commit bae9359032
2 changed files with 6 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/backend-common': patch
---
The logger returned from `getVoidLogger` is now uses a silenced console transport instead.
@@ -14,7 +14,6 @@
* limitations under the License.
*/
import { PassThrough } from 'stream';
import * as winston from 'winston';
/**
@@ -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 })],
});
}