mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
fix(logs): release rejections cap line length at 1KB (#997)
* fix(debug/release/rejection): cap line length at 1KB from unlimited * flip to a call limit * dont die on bad metainfo parse * death is here to stay, for now.
This commit is contained in:
parent
90b5cc9351
commit
5cdf68bc77
3 changed files with 10 additions and 5 deletions
|
@ -608,9 +608,14 @@ func (r *Release) resetRejections() {
|
|||
r.Rejections = []string{}
|
||||
}
|
||||
|
||||
func (r *Release) RejectionsString() string {
|
||||
func (r *Release) RejectionsString(trim bool) string {
|
||||
if len(r.Rejections) > 0 {
|
||||
return strings.Join(r.Rejections, ", ")
|
||||
out := strings.Join(r.Rejections, ", ")
|
||||
if trim && len(out) > 1024 {
|
||||
out = out[:1024]
|
||||
}
|
||||
|
||||
return out
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue