Created
August 8, 2016 04:55
-
-
Save monkey-codes/208866eff3ea05c000cdece28389dcab to your computer and use it in GitHub Desktop.
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
@SpringBootApplication | |
class CloudwatchLoggingApplication { | |
@Bean | |
EmbeddedServletContainerFactory servletContainer(TomcatContextCustomizer customizer) { | |
def factory = new TomcatEmbeddedServletContainerFactory() | |
factory.setTomcatContextCustomizers([customizer]) | |
factory | |
} | |
@Bean | |
TomcatContextCustomizer contextCustomizer(){ | |
new TomcatContextCustomizer() { | |
@Override | |
void customize(Context context) { | |
context.getPipeline().addValve(new LogbackValve()) | |
} | |
} | |
} | |
static void main(String[] args) { | |
SpringApplication.run CloudwatchLoggingApplication, args | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment