Skip to content

Any methods to suppress these annoying log.Printf #59

Closed
@caryyu

Description

@caryyu

As there are some invalid formats that will be parsed and can't be read properly, I'd like to know if it is possible to avoid this annoying output from the code below:

go-astisub/ssa.go

Lines 178 to 199 in aa9412f

log.Printf("astisub: unknown section: %s", line)
sectionName = ssaSectionNameUnknown
continue
}
}
// Unknown section
if sectionName == ssaSectionNameUnknown {
continue
}
// Comment
if len(line) > 0 && line[0] == ';' {
si.comments = append(si.comments, strings.TrimSpace(line[1:]))
continue
}
// Split on ":"
var split = strings.Split(line, ":")
if len(split) < 2 || split[0] == "" {
log.Printf("astisub: not understood: '%s', ignoring", line)
continue

Plus: If there's a method that I can verify whether or not the format is correct before that, will make it even better

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions