permaculture playing cards
The moose likes Spring and the fly likes what spring technology can I use for user logs? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "what spring technology can I use for user logs?" Watch "what spring technology can I use for user logs?" New topic
Author

what spring technology can I use for user logs?

Kent de Guzman
Greenhorn

Joined: Sep 13, 2013
Posts: 14

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

Joined: Jul 04, 2006
Posts: 236
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

Joined: Mar 22, 2005
Posts: 42958
    
  73
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

Joined: Mar 07, 2010
Posts: 1682
    
    7

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.


[How To Ask Questions][Read before you PM me]
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: what spring technology can I use for user logs?
 
It's not a secret anymore!