Skip to content

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

License

Notifications You must be signed in to change notification settings

devxchangeio-blog/payload-logging

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

payload-logging

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

Maven Repo

maven { url "https://oss.sonatype.org/content/groups/public"}

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages