firewalllogs*.dat: Reduce amount of code to set row bgcolor

Replace 10 if statements with duplicated code for print
and setting background color by using a variable and
one if statement.