Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #12801

Re: Question about loggers

From markspace <-@.>
Newsgroups comp.lang.java.programmer
Subject Re: Question about loggers
Date 2012-03-09 07:54 -0800
Organization A noiseless patient Spider
Message-ID <jjd93h$gp$1@dont-email.me> (permalink)
References (4 earlier) <jjair3$63e$1@news.albasani.net> <29668555.311.1331223311031.JavaMail.geo-discussion-forums@vbbfv2> <jjase9$fo2$1@dont-email.me> <17863687.969.1331305893320.JavaMail.geo-discussion-forums@vblb5> <jjd8i2$475$1@news.albasani.net>

Show all headers | View raw


On 3/9/2012 7:45 AM, Lew wrote:
>
> Declaring a log member as 'static' is not more efficient. What are they
> talking about?


Probably the blindingly obvious point that O(1) instantiation of the 
logger is better than a per-object O(n) instantiation.


> Robert Klemme wrote:
>> http://commons.apache.org/logging/guide.html
>>
>> Truth is that static loggers are recommended for application code;
>> only for library code they recommend against static loggers.


By "application" do you mean JEE app or desktop app?

Either way, I don't understand your assertion.  Why would static vs. 
instance make any difference in a library, assuming no shared or other 
special classloaders are in use?

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Question about loggers Novice <novice@example..com> - 2012-03-07 21:52 +0000
  Re: Question about loggers Arne Vajhøj <arne@vajhoej.dk> - 2012-03-07 17:16 -0500
    Re: Question about loggers Novice <novice@example..com> - 2012-03-07 23:57 +0000
      Re: Question about loggers Arne Vajhøj <arne@vajhoej.dk> - 2012-03-07 19:24 -0500
        Re: Question about loggers Lew <noone@lewscanon.com> - 2012-03-08 07:22 -0800
          Re: Question about loggers Arne Vajhøj <arne@vajhoej.dk> - 2012-03-08 10:27 -0500
            Re: Question about loggers Lew <lewbloch@gmail.com> - 2012-03-08 11:58 -0800
              Re: Question about loggers Arne Vajhøj <arne@vajhoej.dk> - 2012-03-08 15:49 -0500
          Re: Question about loggers Robert Klemme <shortcutter@googlemail.com> - 2012-03-08 08:15 -0800
            Re: Question about loggers markspace <-@.> - 2012-03-08 10:05 -0800
              Re: Question about loggers Arne Vajhøj <arne@vajhoej.dk> - 2012-03-08 13:50 -0500
              Re: Question about loggers Robert Klemme <shortcutter@googlemail.com> - 2012-03-09 07:11 -0800
                Re: Question about loggers Lew <noone@lewscanon.com> - 2012-03-09 07:45 -0800
                Re: Question about loggers markspace <-@.> - 2012-03-09 07:54 -0800
                Re: Question about loggers Arne Vajhøj <arne@vajhoej.dk> - 2012-03-09 11:03 -0500
                Re: Question about loggers markspace <-@.> - 2012-03-09 09:10 -0800
                Re: Question about loggers Arne Vajhøj <arne@vajhoej.dk> - 2012-03-09 12:27 -0500
                Re: Question about loggers Lew <lewbloch@gmail.com> - 2012-03-09 10:56 -0800
                Re: Question about loggers Robert Klemme <shortcutter@googlemail.com> - 2012-03-09 20:29 +0100
                Re: Question about loggers Arne Vajhøj <arne@vajhoej.dk> - 2012-03-09 11:04 -0500
                Re: Question about loggers markspace <-@.> - 2012-03-09 09:14 -0800
                Re: Question about loggers Arne Vajhøj <arne@vajhoej.dk> - 2012-03-09 12:22 -0500
                Re: Question about loggers Lew <lewbloch@gmail.com> - 2012-03-09 10:58 -0800
  Re: Question about loggers markspace <-@.> - 2012-03-07 15:21 -0800
    Re: Question about loggers Novice <novice@example..com> - 2012-03-08 00:01 +0000
    Re: Question about loggers Arne Vajhøj <arne@vajhoej.dk> - 2012-03-07 19:21 -0500
      Re: Question about loggers Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-03-08 06:18 -0400

csiph-web