mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 00:52:55 +00:00
refactor: update dependencies
This commit is contained in:
committed by
Rainer Killinger
parent
edc6e6fad5
commit
9de064756a
@@ -12,10 +12,8 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import * as moment from 'moment';
|
||||
import {LogLevel} from '../logger';
|
||||
import {Transformation} from '../transformation';
|
||||
|
||||
/**
|
||||
* Transformation that adds a timestamp to output
|
||||
*/
|
||||
@@ -38,6 +36,7 @@ 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