import { LOG_LEVELS } from '../constants' ; import * as formats from '../formats' ; import { Transport } from '../Transport' ; import { LogItem , TransportOptions } from '../types' ; export class ConsoleTransport extends Transport < TransportOptions > { constructor ( options ? ) { super ( { format : formats . console , levels : LOG_LEVELS , ... options , } ) ; } write ( message , item ) { console [ item . level ] ( message . trim ( ) ) ; } }