Added MaxLog Size
This commit is contained in:
13
pihole-ha-connector.service
Normal file
13
pihole-ha-connector.service
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Pi-hole to Home Assistant Connector
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=artanis
|
||||||
|
WorkingDirectory=/home/artanis/Documents/PIholeDNS_HA_Connector
|
||||||
|
ExecStart=/home/artanis/.nvm/versions/node/v24.6.0/bin/node src/app.js
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
@@ -13,8 +13,8 @@ const logger = winston.createLogger({
|
|||||||
),
|
),
|
||||||
transports: [
|
transports: [
|
||||||
new winston.transports.Console({ format: winston.format.simple() }),
|
new winston.transports.Console({ format: winston.format.simple() }),
|
||||||
new winston.transports.File({ filename: 'error.log', level: 'error' }),
|
new winston.transports.File({ filename: 'error.log', level: 'error', maxsize: 5242880, maxFiles: 5 }),
|
||||||
new winston.transports.File({ filename: 'combined.log' })
|
new winston.transports.File({ filename: 'combined.log', maxsize: 5242880, maxFiles: 5 })
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user