|
Hi,
knows anybody, how I configure logging in Jersey? We use native Log4J in our projects. Thanx, Robert --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
Administrator
|
On Dec 8, 2009, at 9:28 AM, Robert Naczinski wrote: > Hi, > > knows anybody, how I configure logging in Jersey? > Jersey currently uses JDK logging, so any configuration needs to utilize that. The current reason for not switching is to avoid adding further dependencies. If there are significant advantages we could switch e.g. to slf4j. BTW we need to review the exception throwing and logging in Jersey. Currently it's a bit chaotic. For example, we should expose a well- defined set of loggers that are publicly available for configuration. Paul. > We use native Log4J in our projects. > > Thanx, > > Robert > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
Paul,
I am trying to use slf4j binding with log4j. Is that not gonna work with Jersey? Suneel ----- Original Message ---- From: Paul Sandoz <[hidden email]> To: [hidden email] Sent: Tue, December 8, 2009 5:09:04 AM Subject: Re: [Jersey] Logging in Jersey On Dec 8, 2009, at 9:28 AM, Robert Naczinski wrote: > Hi, > > knows anybody, how I configure logging in Jersey? > Jersey currently uses JDK logging, so any configuration needs to utilize that. The current reason for not switching is to avoid adding further dependencies. If there are significant advantages we could switch e.g. to slf4j. BTW we need to review the exception throwing and logging in Jersey. Currently it's a bit chaotic. For example, we should expose a well-defined set of loggers that are publicly available for configuration. Paul. > We use native Log4J in our projects. > > Thanx, > > Robert > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
Administrator
|
On Dec 8, 2009, at 3:49 PM, Suneel Marthi wrote: > Paul, > > I am trying to use slf4j binding with log4j. Is that not gonna work > with Jersey? > There is no restriction in terms of the logging solution that your application uses. But since Jersey uses JDK logging you need to utilize JDK logging configuration or some suitable bridge to it to control the logging output from the Jersey runtime. Does that answer your question? Paul. > Suneel > > > > > ----- Original Message ---- > From: Paul Sandoz <[hidden email]> > To: [hidden email] > Sent: Tue, December 8, 2009 5:09:04 AM > Subject: Re: [Jersey] Logging in Jersey > > > On Dec 8, 2009, at 9:28 AM, Robert Naczinski wrote: > >> Hi, >> >> knows anybody, how I configure logging in Jersey? >> > > Jersey currently uses JDK logging, so any configuration needs to > utilize that. The current reason for not switching is to avoid > adding further dependencies. If there are significant advantages we > could switch e.g. to slf4j. > > BTW we need to review the exception throwing and logging in Jersey. > Currently it's a bit chaotic. For example, we should expose a well- > defined set of loggers that are publicly available for configuration. > > Paul. > > >> We use native Log4J in our projects. >> >> Thanx, >> >> Robert >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [hidden email] >> For additional commands, e-mail: [hidden email] >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
Yes, that answers my question. Thanks Paul.
----- Original Message ---- From: Paul Sandoz <[hidden email]> To: [hidden email] Sent: Tue, December 8, 2009 10:31:03 AM Subject: Re: [Jersey] Logging in Jersey On Dec 8, 2009, at 3:49 PM, Suneel Marthi wrote: > Paul, > > I am trying to use slf4j binding with log4j. Is that not gonna work with Jersey? > There is no restriction in terms of the logging solution that your application uses. But since Jersey uses JDK logging you need to utilize JDK logging configuration or some suitable bridge to it to control the logging output from the Jersey runtime. Does that answer your question? Paul. > Suneel > > > > > ----- Original Message ---- > From: Paul Sandoz <[hidden email]> > To: [hidden email] > Sent: Tue, December 8, 2009 5:09:04 AM > Subject: Re: [Jersey] Logging in Jersey > > > On Dec 8, 2009, at 9:28 AM, Robert Naczinski wrote: > >> Hi, >> >> knows anybody, how I configure logging in Jersey? >> > > Jersey currently uses JDK logging, so any configuration needs to utilize that. The current reason for not switching is to avoid adding further dependencies. If there are significant advantages we could switch e.g. to slf4j. > > BTW we need to review the exception throwing and logging in Jersey. Currently it's a bit chaotic. For example, we should expose a well-defined set of loggers that are publicly available for configuration. > > Paul. > > >> We use native Log4J in our projects. >> >> Thanx, >> >> Robert >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [hidden email] >> For additional commands, e-mail: [hidden email] >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
In reply to this post by smarthi
Hello Suneel,
I found this explanation very helpful for my project: http://mail-archives.apache.org/mod_mbox/incubator-shiro-user/200907.mbox/<[hidden email]> Suneel Marthi escribio': > Paul, > > I am trying to use slf4j binding with log4j. Is that not gonna work with Jersey? > > Suneel > > > > > ----- Original Message ---- > From: Paul Sandoz <[hidden email]> > To: [hidden email] > Sent: Tue, December 8, 2009 5:09:04 AM > Subject: Re: [Jersey] Logging in Jersey > > > On Dec 8, 2009, at 9:28 AM, Robert Naczinski wrote: > > >> Hi, >> >> knows anybody, how I configure logging in Jersey? >> >> > > Jersey currently uses JDK logging, so any configuration needs to utilize that. The current reason for not switching is to avoid adding further dependencies. If there are significant advantages we could switch e.g. to slf4j. > > BTW we need to review the exception throwing and logging in Jersey. Currently it's a bit chaotic. For example, we should expose a well-defined set of loggers that are publicly available for configuration. > > Paul. > > > >> We use native Log4J in our projects. >> >> Thanx, >> >> Robert >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [hidden email] >> For additional commands, e-mail: [hidden email] >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
In reply to this post by Paul Sandoz
Hi Paul,
I think moving to slf4j would be great. One of the big issue with the JDK Logging is that it doesn't allow per webapp configuration, it a JVM wide configuration which means that configuring for one webapp could affect the logging of other applications running in the same JVM. This is a major drawback when you build an webapp and don't necessarily control the environment in which it will get deployed (our customers can chose how they deploy it). All we want/need is to enable our customers to configure the logging of our application without affecting other application or even the app server. For this reason I would strongly suggest moving away from JDK logging. slf4j is definitely the best choice for logging nowadays and those who want to ultimately use JDK logging still can with a minimal impact on performance, permgen etc. What do you think? SaM On Tue, Dec 8, 2009 at 9:09 PM, Paul Sandoz <[hidden email]> wrote: > > On Dec 8, 2009, at 9:28 AM, Robert Naczinski wrote: > >> Hi, >> >> knows anybody, how I configure logging in Jersey? >> > > Jersey currently uses JDK logging, so any configuration needs to utilize > that. The current reason for not switching is to avoid adding further > dependencies. If there are significant advantages we could switch e.g. to > slf4j. > > BTW we need to review the exception throwing and logging in Jersey. > Currently it's a bit chaotic. For example, we should expose a well-defined > set of loggers that are publicly available for configuration. > > Paul. > > >> We use native Log4J in our projects. >> >> Thanx, >> >> Robert >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [hidden email] >> For additional commands, e-mail: [hidden email] >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
On Tue, Dec 8, 2009 at 1:35 PM, Samuel Le Berrigaud
<[hidden email]> wrote: > I think moving to slf4j would be great. One of the big issue with the > JDK Logging is that it doesn't allow per webapp configuration, it a > JVM wide configuration which means that configuring for one webapp > could affect the logging of other applications running in the same > JVM. While this is true for the "out of the box" JDK LogManager, several servers have provided extended LogManager implementations that support per-webapp configuration. For example, Tomcat and JBoss both use JULI to provide this -- see <http://www.crazysquirrel.com/computing/java/logging.jspx> for more info. Craig --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
This post has NOT been accepted by the mailing list yet.
In reply to this post by Robert Naczinski-2
To shut if off
java.util.logging.Logger jersey = java.util.logging.Logger.getLogger("com.sun.jersey"); jersey.setLevel(java.util.logging.Level.OFF); |
|
In reply to this post by Robert Naczinski-2
To shut if off
java.util.logging.Logger jersey = java.util.logging.Logger.getLogger("com.sun.jersey"); jersey.setLevel(java.util.logging.Level.OFF); |
|
In reply to this post by Samuel Le Berrigaud-3
On 12/08/2009 10:35 PM, Samuel Le Berrigaud wrote:
> Hi Paul, > > I think moving to slf4j would be great. One of the big issue with the > JDK Logging is that it doesn't allow per webapp configuration, it a > JVM wide configuration which means that configuring for one webapp > could affect the logging of other applications running in the same > JVM. > > This is a major drawback when you build an webapp and don't > necessarily control the environment in which it will get deployed (our > customers can chose how they deploy it). All we want/need is to enable > our customers to configure the logging of our application without > affecting other application or even the app server. For this reason I > would strongly suggest moving away from JDK logging. > > slf4j is definitely the best choice for logging nowadays and those who > want to ultimately use JDK logging still can with a minimal impact on > performance, permgen etc. > > What do you think? I second this. All frameworks and libraries that use a logging implementation (eg. Log4j, jul or logback) are a pain to integrate. Sure there are hacks to make it work, but they are painful and just that, hacks. That's why logging bridges were invented ten years ago. These days slf4j is the logging bridge to use. Cheers Philippe |
|
Hello All,
I am in favor of using a bridge to make it easier to configure on a per project basis, but I will leave it open as to the selection. slf4j is very popular, but may not be the best fit. I think that it is more important to figure out the requirements instead of the solution first.
John
____________________________ ____________________________ ____________________________ "Far better it is to dare mighty things, to win glorious triumphs, even though checkered by failure, than to take rank with those poor spirits who neither enjoy much nor suffer much, because they live in the gray twilight that knows not victory nor defeat." -- Theodore Roosevelt On Fri, Jan 27, 2012 at 12:13 PM, Philippe Marschall <[hidden email]> wrote: On 12/08/2009 10:35 PM, Samuel Le Berrigaud wrote: |
| Powered by Nabble | Edit this page |
