Skip to content

Commit

Permalink
Merge pull request #14 from CameronRP/issue-13-dont-include-timestamp
Browse files Browse the repository at this point in the history
Don't include timestamp in log output & remove corrupt CPTV files
  • Loading branch information
CameronRP authored Nov 22, 2017
2 parents 7d808ba + c9ec2a9 commit 92dda93
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ func main() {
}

func runMain() error {
log.SetFlags(0) // Removes default timestamp flag

args := procArgs()
conf, err := ParseConfigFile(args.ConfigFile)
if err != nil {
Expand Down Expand Up @@ -103,7 +105,8 @@ func uploadFile(api *CacophonyAPI, filename string) error {

info, err := extractCPTVInfo(filename)
if err != nil {
return err
log.Println("failed to extract CPTV info from file. Deleting CPTV file")
return os.Remove(filename)
}
log.Printf("ts=%s duration=%ds", info.timestamp, info.duration)

Expand Down

0 comments on commit 92dda93

Please sign in to comment.