emilsoftware-utilities 1.2.3 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/logger.js +10 -1
- package/package.json +1 -1
- package/src/logger.ts +10 -1
package/logger.js
CHANGED
|
@@ -80,7 +80,16 @@ var Logger = /** @class */ (function () {
|
|
|
80
80
|
};
|
|
81
81
|
Logger.prototype.getFileName = function () {
|
|
82
82
|
var now = new Date();
|
|
83
|
-
|
|
83
|
+
var date = now.getDate();
|
|
84
|
+
var dateString = "" + date;
|
|
85
|
+
if (date < 10)
|
|
86
|
+
dateString = "0" + dateString;
|
|
87
|
+
var month = (now.getMonth() + 1);
|
|
88
|
+
var monthString = "" + month;
|
|
89
|
+
if (month < 10)
|
|
90
|
+
monthString = "0" + monthString;
|
|
91
|
+
var yearString = now.getFullYear() + "";
|
|
92
|
+
return dateString + "-" + monthString + "-" + yearString;
|
|
84
93
|
};
|
|
85
94
|
Logger.prototype.execStart = function (prefix) {
|
|
86
95
|
if (prefix === void 0) { prefix = ""; }
|
package/package.json
CHANGED
package/src/logger.ts
CHANGED
|
@@ -48,7 +48,16 @@ export class Logger {
|
|
|
48
48
|
|
|
49
49
|
private getFileName(): string {
|
|
50
50
|
const now = new Date();
|
|
51
|
-
|
|
51
|
+
let date = now.getDate();
|
|
52
|
+
let dateString = "" + date;
|
|
53
|
+
if (date < 10) dateString = "0" + dateString;
|
|
54
|
+
|
|
55
|
+
let month = (now.getMonth() + 1);
|
|
56
|
+
let monthString = "" + month;
|
|
57
|
+
if (month < 10) monthString = "0" + monthString;
|
|
58
|
+
|
|
59
|
+
let yearString = now.getFullYear() + "";
|
|
60
|
+
return dateString + "-" + monthString + "-" + yearString;
|
|
52
61
|
}
|
|
53
62
|
|
|
54
63
|
public execStart(prefix: string = ""): number {
|