From b0319778050f960b4498d599e79149cce2406db9 Mon Sep 17 00:00:00 2001 From: mdb Date: Fri, 31 May 2002 21:15:27 +0000 Subject: [PATCH] Fixed bugs pointed out by Mr. Greenwell: milliseconds field need only be 3 wide, use GAP rather than prefix that may contain formatting codes to obtain wrapped line width. git-svn-id: https://samskivert.googlecode.com/svn/trunk@770 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- .../src/java/com/samskivert/util/DefaultLogProvider.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/projects/samskivert/src/java/com/samskivert/util/DefaultLogProvider.java b/projects/samskivert/src/java/com/samskivert/util/DefaultLogProvider.java index 30c47c18..ff7cec72 100644 --- a/projects/samskivert/src/java/com/samskivert/util/DefaultLogProvider.java +++ b/projects/samskivert/src/java/com/samskivert/util/DefaultLogProvider.java @@ -1,5 +1,5 @@ // -// $Id: DefaultLogProvider.java,v 1.6 2002/05/31 21:06:26 mdb Exp $ +// $Id: DefaultLogProvider.java,v 1.7 2002/05/31 21:15:27 mdb Exp $ // // samskivert library - useful routines for java programs // Copyright (C) 2001 Michael Bayne @@ -96,11 +96,11 @@ public class DefaultLogProvider implements LogProvider // then it will be turned off when underlining is turned off // if we wrap, we include the module name in the wrapped text - int wrapwid = LOG_LINE_LENGTH - buf.length(); buf.append(_useVT100 ? UNDERLINE : "").append(moduleName); buf.append(_useVT100 ? PLAIN : "").append(": "); // we'll be wrapping the log lines + int wrapwid = LOG_LINE_LENGTH - GAP.length(); int remain = message.length(), offset = 0; int linewid = Math.min(LOG_LINE_LENGTH - buf.length(), remain); @@ -132,13 +132,13 @@ public class DefaultLogProvider implements LogProvider /** Used to accompany log messages with time stamps. */ protected SimpleDateFormat _format = - new SimpleDateFormat("yyyy/MM/dd HH:mm:ss:SSSS"); + new SimpleDateFormat("yyyy/MM/dd HH:mm:ss:SSS"); /** Used to tag log messages with their log level. */ protected static final String[] LEVEL_CHARS = { ".", "?", "!" }; /** Used to align wrapped log lines. */ - protected static final String GAP = " "; + protected static final String GAP = " "; /** VT100 formatting code to enabled bold text. */ protected static final String BOLD = "\033[1m";