I have created a no. of constant variables, more than 1000, those constants are unique integer.
public static final FOO 335343 public static final BAR 2342
I would suggest that you print out the line number, not the variable name. That should give you enough to determine where the message is coming from. Here's more info on how to do that:
How can we print line numbers to the log in java