Skip to content

Commit

Permalink
Fix printing in debug mode
Browse files Browse the repository at this point in the history
fixes printing of "duplicates" and "matchcount" in debug mode
  • Loading branch information
jkansanen committed Jul 14, 2017
1 parent 5c3cd0a commit 71679b0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/par2repairer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,6 @@ bool Par2Repairer::VerifySourceFiles(const std::string& basepath, std::list<Comm
cout << "[DEBUG] file: " << file << endl;
cout << "[DEBUG] name: " << name << endl;
cout << "[DEBUG] targ: " << target_pathname << endl;
cout << "[DEBUG] ----------------------" << endl;

This comment has been minimized.

Copy link
@BlackIkeEagle

BlackIkeEagle Jul 15, 2017

Member

why did you remove thisone and left the other ------ line in?

This comment has been minimized.

Copy link
@jkansanen

jkansanen Jul 15, 2017

Author Collaborator

Before:

[DEBUG] VerifySourceFiles ----
[DEBUG] file: /path/teeeeeeeeeeeeeeeeeeeeeeestfile1
[DEBUG] name: teeeeeeeeeeeeeeeeeeeeeeestfile1
[DEBUG] targ: /path/teeeeeeeeeeeeeeeeeeeeeeestfile1
[DEBUG] ----------------------
[DEBUG] matchcount: teeeeeeeeeeeeeeeeeeeeeeestfile11000
Target: "teeeeeeeeeeeeeeeeeeeeeeestfile1" - found.

After:

[DEBUG] VerifySourceFiles ----
[DEBUG] file: /path/teeeeeeeeeeeeeeeeeeeeeeestfile1
[DEBUG] name: teeeeeeeeeeeeeeeeeeeeeeestfile1
[DEBUG] targ: /path/teeeeeeeeeeeeeeeeeeeeeeestfile1
[DEBUG] matchcount: 1000
[DEBUG] ----------------------
Target: "teeeeeeeeeeeeeeeeeeeeeeestfile1" - found.

This comment has been minimized.

Copy link
@BlackIkeEagle

BlackIkeEagle Jul 15, 2017

Member

ah ok, thanks

}

// if the target file is in the list of extra files, we remove it
Expand Down Expand Up @@ -1683,9 +1682,13 @@ bool Par2Repairer::ScanDataFile(DiskFile *diskfile, // [in]

if (noiselevel >= CommandLine::nlDebug)
{
// Clear out old scanning line
cout << std::setw(shortname.size()+19) << std::setfill(' ') << "";

if (duplicatecount > 0)
cout << "[DEBUG] duplicates: " << duplicatecount << endl;
cout << "[DEBUG] matchcount: " << count << endl;
cout << "\r[DEBUG] duplicates: " << duplicatecount << endl;
cout << "\r[DEBUG] matchcount: " << count << endl;
cout << "[DEBUG] ----------------------" << endl;
}

// Did we make any matches at all
Expand Down

0 comments on commit 71679b0

Please sign in to comment.