I'm looking for a way to mask specific code lines in the IDE. I prefer doing it in eclipse
, but intellij
would be fine also.
The purpose is, that when I have a method like this:
public String serialize() {
log.info("Starting to serialize");
StringBuilder sb = new StringBuilder();
sb.append("name: " + this.name);
sb.append("age: " + this.age);
sb.append("sex: " + this.sex);
log.info("Finished serializing. The result is: " + sb.toString());
return sb.toString();
}
I will make it look like this:
public String serialize() {
StringBuilder sb = new StringBuilder();
sb.append("name: " + this.name);
sb.append("age: " + this.age);
sb.append("sex: " + this.sex);
return sb.toString();
}
This is of course only an example. I work with code that contains a lot of log lines and a lot of metrics for better monitoring of the app. This clutters the code massively and I wish to only see code logic when I code.
Does either of the mentioned IDE (or another one) enable this feature?