mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-19 16:13:06 +00:00
refactor: update to typescript 4.4.4
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
*/
|
||||
import {LogLevel} from '../logger';
|
||||
import {Transformation} from '../transformation';
|
||||
import moment from 'moment';
|
||||
|
||||
/**
|
||||
* Transformation that adds a timestamp to output
|
||||
*/
|
||||
@@ -22,7 +24,6 @@ export class Timestamp implements Transformation {
|
||||
* Instantiate a new timestamp transformation
|
||||
*
|
||||
* @see https://momentjs.com/docs/#/displaying/format/
|
||||
*
|
||||
* @param format Format for timestamps
|
||||
*/
|
||||
constructor(private readonly format = 'LLLL') {
|
||||
@@ -36,7 +37,6 @@ export class Timestamp implements Transformation {
|
||||
* @param output Output to add timestamp to
|
||||
*/
|
||||
transform(_logLevel: LogLevel, output: string): string {
|
||||
const moment = require('moment');
|
||||
const now = moment();
|
||||
|
||||
return `[${now.format(this.format)}] ${output}`;
|
||||
|
||||
Reference in New Issue
Block a user