Can I print out the name of the variable?

后端 未结 6 645
独厮守ぢ
独厮守ぢ 2021-01-12 15:26

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         


        
6条回答
  •  失恋的感觉
    2021-01-12 15:30

    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

提交回复
热议问题