refactor: update dependencies

This commit is contained in:
Rainer Killinger
2020-03-10 10:56:20 +01:00
committed by Rainer Killinger
parent edc6e6fad5
commit 9de064756a
6 changed files with 1426 additions and 775 deletions

View File

@@ -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}`;