HarperFast / HarperFast/harper
Log rotation maxSize not respected properly
- Dominant language
- JavaScript
- Stars
- 89
- Forks
- 10
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 200
Description
### Bug Summary
Log rotation is enabled with a maxSize is not being respected properly
### Reproduction Repository (if applicable)
_No response_
### Steps to Reproduce
On 5.1.14 there is the following config:
```
logging:
auditAuthEvents:
logFailed: false
logSuccessful: false
auditLog: true
auditRetention: 3d
file: true
level: warn
root: log
rotation:
enabled: true
compress: true
interval: null
maxSize: 512M
path: log
stdStreams: true
external:
level: info
path: /home/harperdb/harper/log/hdb.log
console: true
stdStreams: false
colors: false
path: /home/harperdb/harper/log/system.log
```
And the `hdb.log` file was 200G
### Expected Behavior
maxSize should be respected for the `hdb.log` file
### Actual Behavior
maxSize is not enforced for the `hdb.log` file.
It looks like because that is an `external` log it doesn't respect the default logging configuration for `rotation`.
The docs mention these as options for `external` loggers:
``` Each component logger can have its own path, root, level, tag, and stdStreams settings. All components default to the main logging configuration unless overridden.```
`rotation` is not referenced as an option. It should fall to whatever the default is if not set.
### Platform
_No response_
### Console Errors
_No response_
### Screenshots or Videos
_No response_
### Additional Context
_No response_
### Are you planning to fix this issue?
No, just reporting the issue
### First-time contributor support
- [ ] I'm new to contributing and would appreciate guidance on the process
- [ ] I'd like help understanding the project structure
- [ ] I need assistance with setting up the development environment
- [ ] I'm comfortable contributing, but new to this project specifically
Contributor guide
Assessment
This issue has not been assessed yet.