mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-03-18 15:46:32 +03:00
weblog buffer max 1000 messages with psram, syslog buffer 250 with psram
This commit is contained in:
@@ -38,7 +38,7 @@ import type { LogEntry, LogSettings } from 'types';
|
|||||||
import { LogLevel } from 'types';
|
import { LogLevel } from 'types';
|
||||||
import { updateValueDirty, useRest } from 'utils';
|
import { updateValueDirty, useRest } from 'utils';
|
||||||
|
|
||||||
const MAX_LOG_ENTRIES = 1000; // Limit log entries to prevent memory issues
|
const MAX_LOG_ENTRIES = 10000; // Limit log entries to prevent memory issues
|
||||||
|
|
||||||
const TextColors: Record<LogLevel, string> = {
|
const TextColors: Record<LogLevel, string> = {
|
||||||
[LogLevel.ERROR]: '#ff0000', // red
|
[LogLevel.ERROR]: '#ff0000', // red
|
||||||
@@ -308,6 +308,8 @@ const SystemLog = () => {
|
|||||||
<MenuItem value={50}>50</MenuItem>
|
<MenuItem value={50}>50</MenuItem>
|
||||||
<MenuItem value={75}>75</MenuItem>
|
<MenuItem value={75}>75</MenuItem>
|
||||||
<MenuItem value={100}>100</MenuItem>
|
<MenuItem value={100}>100</MenuItem>
|
||||||
|
<MenuItem value={500}>500</MenuItem>
|
||||||
|
<MenuItem value={1000}>1000</MenuItem>
|
||||||
</TextField>
|
</TextField>
|
||||||
</Grid>
|
</Grid>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -501,7 +501,7 @@ void System::syslog_init() {
|
|||||||
#ifndef EMSESP_STANDALONE
|
#ifndef EMSESP_STANDALONE
|
||||||
if (syslog_enabled_) {
|
if (syslog_enabled_) {
|
||||||
// start & configure syslog
|
// start & configure syslog
|
||||||
syslog_.maximum_log_messages(10);
|
syslog_.maximum_log_messages(psram_ ? 250 : 10);
|
||||||
syslog_.log_level((uuid::log::Level)syslog_level_);
|
syslog_.log_level((uuid::log::Level)syslog_level_);
|
||||||
syslog_.mark_interval(syslog_mark_interval_);
|
syslog_.mark_interval(syslog_mark_interval_);
|
||||||
syslog_.destination(syslog_host_.c_str(), syslog_port_);
|
syslog_.destination(syslog_host_.c_str(), syslog_port_);
|
||||||
|
|||||||
@@ -67,9 +67,9 @@ class WebSettings {
|
|||||||
uint8_t bool_dashboard;
|
uint8_t bool_dashboard;
|
||||||
uint8_t enum_format;
|
uint8_t enum_format;
|
||||||
|
|
||||||
int8_t weblog_level;
|
int8_t weblog_level;
|
||||||
uint8_t weblog_buffer;
|
uint16_t weblog_buffer;
|
||||||
bool weblog_compact;
|
bool weblog_compact;
|
||||||
|
|
||||||
bool fahrenheit;
|
bool fahrenheit;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user