Created
July 28, 2015 09:39
-
-
Save Crydust/f4bb2fd1ba00c180e770 to your computer and use it in GitHub Desktop.
convert System.out to slf4j
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System\.out\.printf\("([^%]*?)%s([^%]*?)%n"(,[^,]*?)\); | |
logger.info("$1{}$2"$3); | |
System\.out\.println\((".*?")\); | |
logger.info($1); | |
System\.out\.printf\((".*?",.*?)\); | |
logger.info(String.format($1)); | |
<dependency> | |
<groupId>org.slf4j</groupId> | |
<artifactId>slf4j-api</artifactId> | |
</dependency> | |
<dependency> | |
<groupId>org.slf4j</groupId> | |
<artifactId>jcl-over-slf4j</artifactId> | |
<scope>runtime</scope> | |
<optional>true</optional> | |
</dependency> | |
private static final Logger logger = LoggerFactory.getLogger(Example.class); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment