Only attempt to obtain our terminal size if we were asked to wrap the log.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@1451 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
mdb
2004-06-15 16:25:02 +00:00
parent 4d01d339f3
commit e4815f981a
@@ -1,5 +1,5 @@
// //
// $Id: DefaultLogProvider.java,v 1.22 2004/02/25 13:20:44 mdb Exp $ // $Id: DefaultLogProvider.java,v 1.23 2004/06/15 16:25:02 mdb Exp $
// //
// samskivert library - useful routines for java programs // samskivert library - useful routines for java programs
// Copyright (C) 2001 Michael Bayne // Copyright (C) 2001 Michael Bayne
@@ -43,9 +43,6 @@ public class DefaultLogProvider implements LogProvider
*/ */
public DefaultLogProvider () public DefaultLogProvider ()
{ {
// obtain our terminal size, if possible
obtainTermSize();
try { try {
// enable vt100 escape codes if requested // enable vt100 escape codes if requested
String pstr = System.getProperty("log_vt100"); String pstr = System.getProperty("log_vt100");
@@ -60,6 +57,11 @@ public class DefaultLogProvider implements LogProvider
} catch (SecurityException se) { } catch (SecurityException se) {
// nothing to worry about // nothing to worry about
} }
// obtain our terminal size, if possible and necessary
if (_wrapLog) {
obtainTermSize();
}
} }
public synchronized void log ( public synchronized void log (