• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what spring technology can I use for user logs?

 
Kent de Guzman
Greenhorn
Posts: 14
Java MyEclipse IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I'm a newbie in Spring MVC, and currently developing admin side of my simple web app.
Now I want to have an idea what is the best way or technology to create user logs? I read about Interceptors of Spring MVC, Spring Security and Spring Aop but I don't know if I can use them for user logs. Any idea Thanks.
 
Surendra Kumar
Ranch Hand
Posts: 236
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Spring Security is not for logging.
Interceptor is only for web applications and it has only pre- and post-handlers.

Spring AOP provides more features and can be used for any application.
It provides different join points like Before, After, Around, After returning, After throwing exception by a method.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why Spring? There are so many elaborate logging frameworks that I don't think yet another one somehow attached to the Spring brand would be a big improvement. These days, slf4j seems to be most fashionable.
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:Why Spring? There are so many elaborate logging frameworks that I don't think yet another one somehow attached to the Spring brand would be a big improvement. These days, slf4j seems to be most fashionable.


Spring does not offer a Logging framework for that very reason. Use SL4J with Logback as your implementation on new projects.

As was mentioned you can use AOP to handle the logging. Logging is a cross cutting concern, so it is a prime candidate for AOP. However AOP does not do the logging Logback does.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic