/payload-logging

Payload Logging Framework provides simplified configuration to log payload for spring project

Primary LanguageJavaApache License 2.0Apache-2.0

Build Status

payload-logging

payload-logging framework provides simplified configuration to log payload for spring project.

Dependencies

compile ("io.oneclicklabs.logging:payload-logging:0.0.2-SNAPSHOT")

Usage

Enable payload-logging - Add below property to your application.properties file

io.oneclicklabs.logging.enabled=true
io.oneclicklabs.logging.request.enabled=true
io.oneclicklabs.logging.response.enabled=true

Injecting the LogWriterManager & adding Interceptors

@Configuration
@EnableWebMvc
public class AppConfig extends WebMvcConfigurerAdapter
{
	@Autowired
	@Qualifier("manager.logwriter")
	private LogWriterManager logWriterManager;

	@Override
	public void addInterceptors(InterceptorRegistry registry)
	{
		registry.addInterceptor(new RestTransactionInterceptor(logWriterManager));
	}
}

Demo Project

Release History

  • 0.0.2-SNAPSHOT

    • adding feature to enable/disable payload logging

  • 0.0.1-SNAPSHOT

    • logging rest verb & payload to console.

Meta

Karthikeyan Sadayamuthu – LinkedIn

Distributed under the Apache License. See LICENSE for more information. license

Contributing

  1. Fork it!

  2. Create your feature branch: git checkout -b my-new-feature

  3. Commit your changes: git commit -am 'Add some feature'

  4. Push to the branch: git push origin my-new-feature

  5. Submit a pull request :D