Skip to content

Instantly share code, notes, and snippets.

@dgershman
Created July 9, 2013 18:01
Show Gist options
  • Select an option

  • Save dgershman/5959644 to your computer and use it in GitHub Desktop.

Select an option

Save dgershman/5959644 to your computer and use it in GitHub Desktop.
protected void printBanner(String name) {
try {
final String banner = WINDOWS_NEWLINE.matcher(Resources.toString(Resources.getResource("banner.txt"),
Charsets.UTF_8))
.replaceAll("\n")
.replace("\n", String.format("%n"));
LOGGER.info(String.format("Starting {}%n{}"), name, banner);
} catch (IllegalArgumentException | IOException ignored) {
// don't display the banner if there isn't one
LOGGER.info("Starting {}", name);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment