ajout du systeme de log
This commit is contained in:
parent
ce73485bc3
commit
e873bc7976
@ -12,4 +12,10 @@ services:
|
||||
- /media/hddmain/security:/snapshot
|
||||
ports:
|
||||
- 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"
|
||||
|
||||
18
index.js
18
index.js
@ -12,13 +12,17 @@ function snapshotPath(){
|
||||
|
||||
return "/snapshot/snapshot-"
|
||||
+ date.getFullYear()
|
||||
+ date.getMonth()
|
||||
+ date.getDay()
|
||||
+ "-"
|
||||
+ date.getHours()
|
||||
+ date.getMinutes()
|
||||
+ date.getSeconds()
|
||||
+ "-"
|
||||
+ "-"
|
||||
+ String(date.getMonth() + 1).padStart(2, '0')
|
||||
+ "-"
|
||||
+ 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()
|
||||
+".jpg";
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user