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


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

Re: SimpleFormatter Question

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe09.iad.POSTED!8ad76e89!not-for-mail
From Arved Sandstrom <asandstrom3minus1@eastlink.ca>
User-Agent Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.27) Gecko/20120216 Lightning/1.0b2 Thunderbird/3.1.19
MIME-Version 1.0
Newsgroups comp.lang.java.programmer
Subject Re: SimpleFormatter Question
References <XnsA011D2474C732jpnasty@94.75.214.39> <4f5ab90d$0$289$14726298@news.sunsite.dk> <XnsA011F1BB1A949jpnasty@94.75.214.39> <XnsA011F3BCFD12Ajpnasty@94.75.214.39>
In-Reply-To <XnsA011F3BCFD12Ajpnasty@94.75.214.39>
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 7bit
Lines 48
Message-ID <YDI6r.12585$wf.1272@newsfe09.iad> (permalink)
X-Complaints-To abuse@newsgroups-download.com
NNTP-Posting-Date Sat, 10 Mar 2012 13:26:16 UTC
Organization Public Usenet Newsgroup Access
Date Sat, 10 Mar 2012 09:26:15 -0400
X-Received-Bytes 3020
Xref csiph.com comp.lang.java.programmer:12835

Show key headers only | View raw


On 12-03-10 12:57 AM, Novice wrote:
[ SNIP ]
> 
> One followup question. When I tried this in my logging.properties:
> 
> java.util.logging.SimpleFormatter.format = "%4$s: %5$s [%1$tc]%n"
> 
> The log messages included quotes that weren't found in the result 
> predicted by the SimpleFormatter documentation. When I removed the quotes 
> from the line I've just quoted, the messages came out the way they were 
> supposed to. 
> 
> In other words, it appears that the quotes shown in the Javadoc don't 
> belong there. Should I be filing a Bugzilla for that so that Oracle can 
> fix the documentation? Or is there a different procedure to follow?
> 
> Of course, someone may have already filed a report for this small error; 
> I haven't checked yet. And maybe this error is so small and obvious that 
> anyone would figure it out as quickly as I did.
> 
Read up on Properties, especially
http://docs.oracle.com/javase/6/docs/api/java/util/Properties.html#load(java.io.Reader).

Quotes aren't special as far as Properties is concerned. How special
they are depends on what does the "load" and eventually uses the values
(RHS of the key=value pair). More often than not a quote does have
special meaning there, and you might end up either double-quoting in the
properties file or doing some more quoting in the client code. But if a
quote isn't special to a particular user, then it'll just be another
character.

It's not small and obvious, no. This kind of documentation error
presumably has frustrated a fair few people. I don't know why the
SimpleFormatter documentors made that mistake; they likely didn't
understand Properties either.

You could *check* Bugzilla to see if it's already noted.

Lesson learned: supposedly authoritative documentation has its fair
share of errors, some much worse than what you just encountered.

AHS

-- 
Last week I helped my friend stay put. It's a lot easier'n helpin' 'em
move. I just went over to his house and made sure that he did not start
to load shit into a truck.
-- Mitch Hedberg

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


Thread

SimpleFormatter Question Novice <novice@example..com> - 2012-03-10 01:40 +0000
  Re: SimpleFormatter Question Arne Vajhøj <arne@vajhoej.dk> - 2012-03-09 21:14 -0500
    Re: SimpleFormatter Question Novice <novice@example..com> - 2012-03-10 04:45 +0000
      Re: SimpleFormatter Question Novice <novice@example..com> - 2012-03-10 04:57 +0000
        Re: SimpleFormatter Question Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-03-10 09:26 -0400
          Re: SimpleFormatter Question Novice <novice@example..com> - 2012-03-10 17:55 +0000
            Re: SimpleFormatter Question Lew <noone@lewscanon.com> - 2012-03-10 10:27 -0800
              Re: SimpleFormatter Question Novice <novice@example..com> - 2012-03-10 20:47 +0000
        Re: SimpleFormatter Question Arne Vajhøj <arne@vajhoej.dk> - 2012-03-10 12:08 -0500

csiph-web