Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #32172
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: basic output question |
| Date | 2015-07-27 22:25 -0400 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <mp6p6o$19j$3@speranza.aioe.org> (permalink) |
| References | (1 earlier) <450dd941-b331-4f46-9e9c-e7db4033e0ca@googlegroups.com> <mmu43k$tkm$1@dont-email.me> <91961835-9633-4c29-968d-027ce3fb9ff7@googlegroups.com> <5592e61d$0$292$14726298@news.sunsite.dk> <16cd77ab-e259-40b5-8599-de59a7db5dbd@googlegroups.com> |
On 6/30/2015 3:14 PM, e.d.programmer@gmail.com wrote: >>>>> On Monday, June 29, 2015 at 2:40:05 PM UTC-4, Russ P. wrote: >>>>>> So if I call printInformation with no arguments, the >>>>>> output goes to standard output, but if I give it a filename >>>>>> the output goes to the file. Is this the best way to do it, >>>>>> or is there a simpler/better way? I'd also like to be able >>>>>> to append the output to an existing file as well as create >>>>>> a new file. Thanks. >>> I just looked at java.util.logging.Logger and most of that seems >>> irrelevant when all you want to do is write messages to >>> System.out. >> >> Usually people at some point end up needing to do something more >> advanced that just writing to System.out. >> >> OP already reached that level. >> >>> In my static log class I just add the timestamp and calling >>> method and line number to every output line. I don't want to get >>> an instance of a logger object for every line to print much less >>> configure a handler or assign a level. >> >> Rolling file appenders, syslog integration, the ability to adjust >> log level etc. are important in most big applications. > > OP mentioned wanting to do System.out.println(). OP also mentioned wanting to write to a file. Arne
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
basic output question "Russ P." <russ.paielli@gmail.com> - 2015-06-29 11:39 -0700
Re: basic output question Arne Vajhøj <arne@vajhoej.dk> - 2015-06-29 14:53 -0400
Re: basic output question Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-06-29 15:32 -0400
Re: basic output question e.d.programmer@gmail.com - 2015-06-30 05:45 -0700
Re: basic output question Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-06-30 09:05 -0400
Re: basic output question e.d.programmer@gmail.com - 2015-06-30 11:28 -0700
Re: basic output question Arne Vajhøj <arne@vajhoej.dk> - 2015-06-30 14:55 -0400
Re: basic output question e.d.programmer@gmail.com - 2015-06-30 12:14 -0700
Re: basic output question Arne Vajhøj <arne@vajhoej.dk> - 2015-07-27 22:25 -0400
Re: basic output question Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-06-30 15:27 -0400
csiph-web