mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
rotate level
This commit is contained in:
@@ -47,7 +47,7 @@ rest_server.get(ES_LOG_ENDPOINT, (_req, res) => {
|
||||
const interval = setInterval(() => {
|
||||
const data = {
|
||||
t: new Date().toISOString(),
|
||||
l: 7, // debug
|
||||
l: (3 + (count % 6)),
|
||||
i: count,
|
||||
n: 'system',
|
||||
m: 'message #' + count++
|
||||
@@ -55,6 +55,8 @@ rest_server.get(ES_LOG_ENDPOINT, (_req, res) => {
|
||||
res.write(`data: ${JSON.stringify(data)}\n\n`);
|
||||
}, INTERVAL);
|
||||
|
||||
|
||||
|
||||
// if client closes connection
|
||||
res.on('close', () => {
|
||||
console.log('Closing ES connection');
|
||||
|
||||
Reference in New Issue
Block a user