5880N/A * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * <code>LogStream</code> provides a mechanism for logging errors that are 0N/A * of possible interest to those monitoring a system. 0N/A * @author Ann Wollrath (lots of code stolen from Ken Arnold) 0N/A * @deprecated no replacement 0N/A /** table mapping known log names to log stream objects */ 0N/A /** default output stream for new logs */ 0N/A /** log name for this log */ 0N/A /** stream where output of this log is sent to */ 0N/A /** string writer for writing message prefixes to log stream */ 0N/A /** string buffer used for constructing log message prefixes */ 0N/A /** stream used for buffering lines */ 0N/A * Create a new LogStream object. Since this only constructor is 0N/A * private, users must have a LogStream created through the "log" 0N/A * @param name string identifying messages from this log 0N/A * @out output stream that log messages will be sent to 0N/A * @deprecated no replacement 0N/A * Return the LogStream identified by the given name. If 0N/A * a log corresponding to "name" does not exist, a log using 0N/A * the default stream is created. 0N/A * @param name name identifying the desired LogStream 0N/A * @return log associated with given name 0N/A * @deprecated no replacement 0N/A * Return the current default stream for new logs. 0N/A * @return default log stream 0N/A * @see #setDefaultStream 0N/A * @deprecated no replacement 0N/A * Set the default stream for new logs. 0N/A * @param newDefault new default log stream 0N/A * @see #getDefaultStream 0N/A * @deprecated no replacement 0N/A * Return the current stream to which output from this log is sent. 0N/A * @return output stream for this log 0N/A * @see #setOutputStream 0N/A * @deprecated no replacement 0N/A * Set the stream to which output from this log is sent. 0N/A * @param out new output stream for this log 0N/A * @see #getOutputStream 0N/A * @deprecated no replacement 0N/A // Maintain an OutputStreamWriter with default CharToByteConvertor 0N/A // (just like new PrintStream) for writing log message prefixes. 0N/A * Write a byte of data to the stream. If it is not a newline, then 0N/A * the byte is appended to the internal buffer. If it is a newline, 0N/A * then the currently buffered line is sent to the log's output 0N/A * stream, prefixed with the appropriate logging information. 0N/A * @deprecated no replacement 0N/A // synchronize on "this" first to avoid potential deadlock 0N/A synchronized (
this) {
0N/A // construct prefix for log messages: 0N/A // write prefix through to underlying byte stream 0N/A // finally, write the already converted bytes of 0N/A * Write a subarray of bytes. Pass each through write byte method. 0N/A * @deprecated no replacement 0N/A for (
int i =
0; i <
len; ++ i)
0N/A * Return log name as string representation. 0N/A * @deprecated no replacement 0N/A /** log level constant (no logging). */ 0N/A /** log level constant (brief logging). */ 0N/A /** log level constant (verbose logging). */ 0N/A * Convert a string name of a logging level to its internal 0N/A * integer representation. 0N/A * @param s name of logging level (e.g., 'SILENT', 'BRIEF', 'VERBOSE') 0N/A * @return corresponding integer log level 0N/A * @deprecated no replacement