Skip to content

Bitryon Logger Spring boot starter; bitryon logger is a tracer and a logger both. Developers only need to annotate methods and classes to log the parameters and return as trace without writing any logs manually.

License

Notifications You must be signed in to change notification settings

FrankNPC/bitryon-logger-spring-boot-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Maven Central Spring Boot

bitryon-logger-spring-boot-starter

  • 1, introduce the jar, annotate beans with @Logging
		<dependency>
			<groupId>io.bitryon</groupId>
			<artifactId>bitryon-logger-spring-boot-starter</artifactId>
			<version>1.0-SNAPSHOT</version> <!--  new version https://repo1.maven.org/maven2/io/bitryon/bitryon-logger-spring-boot-starter -->
		</dependency>
  • 2, configuration. see the explains in src/*/resource/application.xml, configure logger and app-node.

    • import AutoConfigurationBitryonLogger.class to declare default Logging.
    • If there is no configs from spring, it will go to LoggerFactory and bitryon_logger.properties to get the LoggerProvider as fallback
  • 3, configure http client by adding LoggingHttpClientHeaderWriterInterceptor to write header HTTP_HEADER_STEP_LOG_ID(X-Step-Log-Id), so the next app/service/web-server can pick it up. See UserServiceSubscriber

  • 4, configure web server by adding FilterRegistrationBean< LoggingHttpRequestWebFilter > to pick up header HTTP_HEADER_STEP_LOG_ID(X-Step-Log-Id) from the http request. See ExampleWebServerConfiguration

About

Bitryon Logger Spring boot starter; bitryon logger is a tracer and a logger both. Developers only need to annotate methods and classes to log the parameters and return as trace without writing any logs manually.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages