Skip to content

Commit d7b86c9

Browse files
committed
refact: add timestamp to logs
1 parent ca9d95e commit d7b86c9

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

app.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ const path = require("path")
88
const FormData = require("form-data")
99
const proxy = require("selenium-webdriver/proxy")
1010
const proxyChain = require("proxy-chain")
11-
const { ALL } = require("dns")
11+
require('console-stamp')(console, {
12+
format: ':date(yyyy/mm/dd HH:MM:ss.l)'
13+
})
1214
require("dotenv").config()
1315

1416
const extensionId = "caacbgbklghmpodbdafajbgdnegacfmo"

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"dependencies": {
3+
"console-stamp": "^3.1.2",
34
"crypto": "^1.0.1",
45
"dotenv": "^16.4.5",
56
"form-data": "^4.0.0",

start.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
// 1. read proxies from file
22
const fs = require('fs')
33
const path = require('path')
4+
require('console-stamp')(console, {
5+
format: ':date(yyyy/mm/dd HH:MM:ss.l)'
6+
})
47

58
let proxies = []
69

@@ -38,4 +41,4 @@ if (proxies.length === 0) {
3841
}
3942

4043
// 4. pm2 status
41-
execSync('pm2 logs')
44+
execSync('pm2 status')

0 commit comments

Comments
 (0)