Skip to content

Commit 4815f19

Browse files
committed
chore: fix comments
1 parent 4d1a8c4 commit 4815f19

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

lib/common/helpers.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,8 @@ export function stringify(value: any, replacer?: (key: string, value: any) => an
567567
return JSON.stringify(value, replacer, space || 2);
568568
}
569569

570-
export function getFormattedDate(): string {
570+
//2019-01-07 18:29:50.745
571+
export function getFixedLengthDateString(): string {
571572
const currentDate = new Date();
572573
const year = currentDate.getFullYear();
573574
const month = getFormattedDateComponent((currentDate.getMonth() + 1));

lib/services/analytics/analytics-logging-service.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { EOL } from "os";
2-
import { getFormattedDate } from "../../common/helpers";
2+
import { getFixedLengthDateString } from "../../common/helpers";
33

44
export class AnalyticsLoggingService implements IAnalyticsLoggingService {
55
constructor(private $fs: IFileSystem,
@@ -8,7 +8,7 @@ export class AnalyticsLoggingService implements IAnalyticsLoggingService {
88
public logData(analyticsLoggingMessage: IAnalyticsLoggingMessage): void {
99
if (this.logFile && analyticsLoggingMessage && analyticsLoggingMessage.message) {
1010
analyticsLoggingMessage.type = analyticsLoggingMessage.type || AnalyticsLoggingMessageType.Info;
11-
const formattedDate = getFormattedDate();
11+
const formattedDate = getFixedLengthDateString();
1212
this.$fs.appendFile(this.logFile, `[${formattedDate}] [${analyticsLoggingMessage.type}] ${analyticsLoggingMessage.message}${EOL}`);
1313
}
1414
}

lib/services/performance-service.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { TrackActionNames } from "../constants";
22
const EOL = require("os").EOL;
3-
import { getFormattedDate } from "../common/helpers";
3+
import { getFixedLengthDateString } from "../common/helpers";
44
import * as semver from "semver";
55

66
export class PerformanceService implements IPerformanceService {
@@ -67,7 +67,7 @@ export class PerformanceService implements IPerformanceService {
6767
const info = {
6868
methodInfo,
6969
executionTime,
70-
timestamp: getFormattedDate(),
70+
timestamp: getFixedLengthDateString(),
7171
methodArgs: JSON.parse(methodArgs)
7272
};
7373

0 commit comments

Comments
 (0)