ajout du systeme de log
This commit is contained in:
parent
ce73485bc3
commit
e873bc7976
@ -13,3 +13,9 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 7256:80
|
- 7256:80
|
||||||
command: "npm start"
|
command: "npm start"
|
||||||
|
logging:
|
||||||
|
driver: syslog
|
||||||
|
options:
|
||||||
|
syslog-address: "udp://127.0.0.1:514"
|
||||||
|
syslog-format: "rfc3164"
|
||||||
|
tag: "main-relay"
|
||||||
|
|||||||
14
index.js
14
index.js
@ -12,13 +12,17 @@ function snapshotPath(){
|
|||||||
|
|
||||||
return "/snapshot/snapshot-"
|
return "/snapshot/snapshot-"
|
||||||
+ date.getFullYear()
|
+ date.getFullYear()
|
||||||
+ date.getMonth()
|
|
||||||
+ date.getDay()
|
|
||||||
+ "-"
|
+ "-"
|
||||||
+ date.getHours()
|
+ String(date.getMonth() + 1).padStart(2, '0')
|
||||||
+ date.getMinutes()
|
|
||||||
+ date.getSeconds()
|
|
||||||
+ "-"
|
+ "-"
|
||||||
|
+ String(date.getDate()).padStart(2, '0')
|
||||||
|
+ "_"
|
||||||
|
+ String(date.getHours()).padStart(2, '0')
|
||||||
|
+ "-"
|
||||||
|
+ String(date.getMinutes()).padStart(2, '0')
|
||||||
|
+ "-"
|
||||||
|
+ String(date.getSeconds()).padStart(2, '0')
|
||||||
|
+ "_"
|
||||||
+ date.getMilliseconds()
|
+ date.getMilliseconds()
|
||||||
+".jpg";
|
+".jpg";
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user