Article View: borland.public.jbuilder.java.language
Article #15093Re: How to avoid PrintStream() ?
From: John Lacey
Date: Wed, 07 Jul 1999 00:00
Date: Wed, 07 Jul 1999 00:00
24 lines
1330 bytes
1330 bytes
Anton Grad wrote: > > I want to create a log-file of a Database-Connection and I use for this > task the method java.sql.DriverManager.setLogStream(). But this requires > as argument a PrintStream-Object. > > I allways get the warning "constructor PrintStream(OutputStream out) in > class java.io.PrintStream has been deprecated" and I haven't found a way > how to solve it different. Two things: 1. The PrintStream constructor has been un-deprecated in Java 2. 2. When you move to Java 2, you should switch to using DriverManager.setLogWriter. In JDBC 2.0, DriverManager.setLogStream is deprecated. In short, don't worry about it for now. When you move to Java 2, migrate to PrintWriters. John L cc: Anton Grad
Technical Details
Message-ID:
<3783BC7C.69BF1F23@vizdom.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<37832263.6F5B2F45@fh-rosenheim.de>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,7723955d22b255fd X-Google-Attributes: gidf74b3,public From: John Lacey <johnl@vizdom.com> Subject: Re: How to avoid PrintStream() ? Date: 1999/07/07 Message-ID: <3783BC7C.69BF1F23@vizdom.com> X-Deja-AN: 498286403 Content-Transfer-Encoding: 7bit References: <37832263.6F5B2F45@fh-rosenheim.de> To: Anton Grad <anton.grad@fh-rosenheim.de> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Vizdom Software, Inc. Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language