huridocs/uwazi

View on GitHub
app/api/log.v2/infrastructure/writers/StandardWriter.ts

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
import { LogEntry } from '../LogEntry';
import { LogWriter } from '../LogWriter';

export const StandardWriter: LogWriter = (log: LogEntry) => {
  process.stdout.write(
    `${`${log.timeToString()} - [${log.level.name}] - [${log.tenant.name}]:${log.message}`}\n`
  );
};