GORM logger timeout

This commit is contained in:
aceberg 2025-07-26 20:52:25 +07:00
parent 4d820890bb
commit 48aba334a0
3 changed files with 8 additions and 9 deletions

View file

@ -2,15 +2,15 @@
All notable changes to this project will be documented in this file.
## [v2.1.3] - 2025-0
### Changed
- Upd to `go 1.24.5`
- Moved `DB` handling to `GORM`
- Moved to `github.com/nicholas-fedor/shoutrrr` [#197](https://github.com/aceberg/WatchYourLAN/pull/197)
- Removed `HIST_IN_DB` config option. Now history is always stored in `DB`
### Fixed
- Memory leak bug [#149](https://github.com/aceberg/WatchYourLAN/pull/149)
### Changed
- **DEPRECATED:** `HIST_IN_DB` config option. Now history is always stored in `DB`
- Upd to `go 1.24.5`
- Moved `DB` handling to `GORM`
- Moved to maintained `Shoutrrr`: [github.com/nicholas-fedor/shoutrrr](github.com/nicholas-fedor/shoutrrr) ([#197](https://github.com/aceberg/WatchYourLAN/pull/197))
## [v2.1.2] - 2025-03-30
### Fixed
- Edit names bug

View file

@ -104,7 +104,7 @@ Configuration can be done through config file, GUI or environment variables. Var
| ARP_STRS ARP_STRS_JOINED | See [docs/VLAN_ARP_SCAN.md](https://github.com/aceberg/WatchYourLAN/blob/main/docs/VLAN_ARP_SCAN.md). | |
| LOG_LEVEL | Log level: `debug`, `info`, `warn` or `error` | info |
| TRIM_HIST | Remove history after (hours) | 48 |
| HIST_IN_DB | Store History in DB - if `false`, the History will be stored only in memory and will be lost on app restart. Though, it will keep the app DB smaller (InfluxDB or Prometheus is recommended for long-term History storage) | false |
| HIST_IN_DB | DEPRECATED since 2.1.3. Now History is always stored in DB. Use TRIM_HIST to reduce DB size | |
| USE_DB | Either `sqlite` or `postgres` | sqlite |
| PG_CONNECT | Address to connect to PostgreSQL. (Example: `postgres://username:password@192.168.0.1:5432/dbname?sslmode=disable`). Full list of URL parameters [here](https://pkg.go.dev/github.com/lib/pq#hdr-Connection_String_Parameters) | |
@ -139,7 +139,6 @@ Config file name is `config_v2.yaml`. Example:
```yaml
arp_args: ""
color: dark
hist_in_db: false
host: 0.0.0.0
ifaces: enp4s0
influx_addr: ""

View file

@ -29,7 +29,7 @@ func Start() {
newLogger := logger.New(
log.New(os.Stdout, "\r\n", log.LstdFlags),
logger.Config{
SlowThreshold: time.Second,
SlowThreshold: 5 * time.Second,
LogLevel: logger.Warn,
IgnoreRecordNotFoundError: true,
Colorful: true,