Created
June 16, 2014 19:19
-
-
Save gregturn/787a71ae0339d2188516 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #!/bin/bash | |
| spring run -q `dirname $0`/bootconsole.groovy |
This file contains hidden or 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
| class CleanUpBootConsoleOutput implements CommandLineRunner { | |
| void run(String[] args) { | |
| println "[[Remove the stuff above]]" | |
| System.in.eachLine() { line -> | |
| def m = line =~ /([0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9\.]+) (.+) (: .+)/ | |
| if (m) { | |
| def revised = "${m[0][1]} ... ${m[0][3]}" | |
| if (revised.size() > 80) { | |
| println "${revised[0..77]}..." | |
| } else { | |
| println revised | |
| } | |
| } else { | |
| if (line.size() > 80) { | |
| println "${line[0..77]}..." | |
| } else { | |
| println line | |
| } | |
| } | |
| } | |
| println "[[Remove the stuff below]]" | |
| } | |
| } |
This file contains hidden or 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
| $ GITHUB_TOKEN=ccdbf257f052a594a0e7bd2823a69ae38a48ffb1 mvn clean spring-boot:run | |
| [INFO] Scanning for projects... | |
| [INFO] | |
| [INFO] ------------------------------------------------------------------------ | |
| [INFO] Building Issue Manager 0.0.1-SNAPSHOT | |
| [INFO] ------------------------------------------------------------------------ | |
| ... | |
| . ____ _ __ _ _ | |
| /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ | |
| ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ | |
| \\/ ___)| |_)| | | | | || (_| | ) ) ) ) | |
| ' |____| .__|_| |_|_| |_\__, | / / / / | |
| =========|_|==============|___/=/_/_/_/ | |
| :: Spring Boot :: (v1.1.1.RELEASE) | |
| 2014-06-11 16:55:13.685 INFO 54449 --- [ main] learningspringboot.Application : Starting Application on retina with PID 54449 (/Users/gturnquist/Dropbox/learning_spring_boot/2/issue-manager-3/target/classes started by gturnquist in /Users/gturnquist/Dropbox/learning_spring_boot/2/issue-manager-3) | |
| ... |
This file contains hidden or 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
| $ bootconsole < fragment_01.txt | |
| . ____ _ __ _ _ | |
| /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ | |
| ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ | |
| \\/ ___)| |_)| | | | | || (_| | ) ) ) ) | |
| ' |____| .__|_| |_|_| |_\__, | / / / / | |
| =========|_|==============|___/=/_/_/_/ | |
| :: Spring Boot :: (v1.1.1.RELEASE) | |
| 2014-06-16 15:18:35.462 INFO 75845 --- [ runner-0] o.s.boot.SpringApplication : Starting application on retina with PID 75845 (/Users/gturnquist/.m2/repository/org/springframework/boot/spring-boot/1.1.1.RELEASE/spring-boot-1.1.1.RELEASE.jar started by gturnquist in /Users/gturnquist/Dropbox/learning_spring_boot/2) | |
| 2014-06-16 15:18:35.672 INFO 75845 --- [ runner-0] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@44e6570a: startup date [Mon Jun 16 15:18:35 EDT 2014]; root of context hierarchy | |
| 2014-06-16 15:18:36.280 INFO 75845 --- [ runner-0] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup | |
| [[Remove the stuff above]] | |
| $ GITHUB_TOKEN=ccdbf257f052a594a0e7bd2823a69ae38a48ffb1 mvn clean spring-boot:... | |
| [INFO] Scanning for projects... | |
| [INFO] | |
| [INFO] ------------------------------------------------------------------------ | |
| [INFO] Building Issue Manager 0.0.1-SNAPSHOT | |
| [INFO] ------------------------------------------------------------------------ | |
| ... | |
| . ____ _ __ _ _ | |
| /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ | |
| ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ | |
| \\/ ___)| |_)| | | | | || (_| | ) ) ) ) | |
| ' |____| .__|_| |_|_| |_\__, | / / / / | |
| =========|_|==============|___/=/_/_/_/ | |
| :: Spring Boot :: (v1.1.1.RELEASE) | |
| 2014-06-11 16:55:13.685 ... : Starting Application on retina with PID 54449 (/... | |
| ... | |
| [[Remove the stuff below]] | |
| 2014-06-16 15:18:36.426 INFO 75845 --- [ runner-0] o.s.boot.SpringApplication : Started application in 1.315 seconds (JVM running for 3.379) | |
| 2014-06-16 15:18:36.428 INFO 75845 --- [ Thread-2] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@44e6570a: startup date [Mon Jun 16 15:18:35 EDT 2014]; root of context hierarchy | |
| 2014-06-16 15:18:36.429 INFO 75845 --- [ Thread-2] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment