This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 38372 - Error manager truncates log messages containing \n's
Summary: Error manager truncates log messages containing \n's
Status: VERIFIED WORKSFORME
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: All All
: P4 blocker (vote)
Assignee: issues@platform
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-04 05:58 UTC by _ tboudreau
Modified: 2008-12-22 21:57 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ tboudreau 2004-01-04 05:58:43 UTC
I've got some logging I need to do, and including
newlines seemed a pretty reasonable way to do it -
basically when malformed HTML is passed to the
lightweight renderer, in dev builds, there should
be formatted output like:

Malformed html:
<html>foo <qrzmph> bar </html>
          ^

To indicate exactly where the problem was for
debugging purposes.

I was rather surprised to find the only output on
the console or in the log was "Malformed html:".
Comment 1 Jesse Glick 2004-01-04 20:51:27 UTC
Works for me.

---%<---
import org.openide.ErrorManager;
public class Whatever {
    public static void main(String ignore[]) {
        ErrorManager.getDefault().log(ErrorManager.WARNING, "Hey
there!\nA multiline message.");
    }
}
---%<---

Run w/ internal execution, prints both lines, to both ide.log and console.
Comment 2 _ tboudreau 2004-01-04 22:12:49 UTC
Interesting.  Definitely doesn't work for me.  Are you sure there's
nothing different going on with routing output from internal execution?
Comment 3 Jesse Glick 2004-01-05 06:03:29 UTC
What doesn't work for me? The attached sample class, or some stuff you
are doing? If you are having problems, please reduce them to a
reproducible test case.

NbErrorManager does not do anything special with multiline messages.
It just prints them as it gets them.

BTW o.n.c.TopLogging may be of interest. There is some buffering going
on for ide.log, which means that log file prints may be delayed by up
to 15 seconds (to avoid overhead). However printing to console should
be unbuffered.
Comment 4 Marian Mirilovic 2004-03-22 14:25:38 UTC
verified