[rfc][icedtea-web] log jnlp file to console

Jiri Vanek jvanek at redhat.com
Fri Nov 14 15:43:05 UTC 2014


On 11/12/2014 11:09 PM, Jie Kang wrote:
>
>
> ----- Original Message -----
>> On 10/21/2014 03:46 PM, Jiri Vanek wrote:
>>> hi!
>>>
>>> This is not just rfc, but  RFC :) as I'm not sure which way to go.  The
>>> only one I found suitbale -
>>> this oen - is not nice.
>>>
>>> Curently all the logs are going to logger, which determine if debug is on
>>> and what channels are
>>> enabled (stdout/err, file, console)
>>>
>>> According to those, it consume the message. This workflow had one
>>> exception, the reprinting of
>>> jnlpfiel, which went only to console, if debug was online.
>>> Most of the bugreports now contains whole console - and it is very good -
>>> but  that measn the jnlp
>>> file is missing.
>>>
>>>
>>> The jnlpfile reprint was excluded, becasue console is using html
>>> formatting, to higlight outputs -
>>> for palintext the reprint is and willbe working fine, but it is not working
>>> with syntax higlighting
>>> from obvious reasons.
>>>
>>> I wont to avoid escaping of inpout - the message object is sahred between
>>> stdou/file/html
>>> console/plain console so to make special decoding for html console do need
>>> copy of it (and in case
>>> of console solid rework of console itself) and then proces via esapcping.
>>> Another issue is that html in java is terribly old, and hard to say what
>>> specification it supports
>>> (if any).
>>>
>>> To my surpise it support <plaintext> (yes nothing else do so...) So I have
>>> tryed to include the jnlp
>>> reprint wrapped by this tags. And it seems to be working fine wiht all
>>> supported outputs without any
>>> encodings or copying.
>>>
>>> There is drawback - eg firefox now have issues to show everything behind
>>> </plaintext> :( (note -
>>> <pre> do not work for jeeditorpane:( ))
>>>
>>> J.
>> ping, thoughts? I amde an attmept with <pre><plaintext></paintext></pre> and
>> it did not helped.
>> Still the jnlp fiel should appear inconsole :(
>
> Hello,
>
> In user-testing, the JavaConsole now displays the entire jnlp file in one line, making it difficult to read. It seems the break tags do not get formatted when displayed in Java Console (at least for me).
What java are you running on?

It may be differrent im-lementation of pre/plaintex/br or whatever. I do not recall this beaviour.


however - if you switch off formating. it is ok.
>
> However if you copy and paste it into a text file, it becomes multiple lines:
>

Yes, because newline is presented. Only ignored in html output. in pre - both \n and br are here. 
Still not working for you :(
> e.g.
>
> <br/>
> <?xml version="1.0" standalone="yes"?><br/>
> line: 2 <br/>
> line: 3 <jnlp spec="1.0" href="SimpleJNLP.jnlp" xmlns="http://www.w3.org/1999/xhtml"><br/>
> line: 4   <information><br/>
> line: 5     <title>simple application</title><br/>
> line: 6     <vendor>IcedTea</vendor><br/>
> line: 7     <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"></homepage><br/>
> line: 8     <description></description><br/>
> line: 9     <offline-allowed></offline-allowed><br/>
> line: 10   </information><br/>
> line: 11   <resources><br/>
> line: 12     <j2se version="1.4+"></j2se><br/>
> line: 13     <jar href="SimpleJNLP.jar"></jar><br/>
> line: 14   </resources><br/>
> line: 15   <applet-desc name="SimpleJNLP Applet" main-class="SimpleJNLP"><br/>
> line: 16   </applet-desc><br/>
> line: 17 <br/>
> line: 18 <br/>
> line: 19 <br/>
> line: 20 </jnlp><br/>
> line: 21 <br/>
> line: 22
>
> Also, I do not think it's useful to display the line numbers (e.g. line: 2, line: 3, ...). Could these be removed?

I get used  to like them in console output :)
>
> I feel like sending multiple messages to the Java Console might be okay however I don't fully understand the concerns you have at the moment;;
multiple lines - yes. Multiple chars? no :(( So the builder is stil needed - and it will not solve 
the wrap, nor wrong escaping/not escaping :(

>
> Personally, it would be most useful if there were no break tags or line numbers so I could copy and paste the output into a file and have it be pretty much the same as the original jnlp file. Is the Java Console limited and unable to do this? Maybe we can modify Java Console to support what we need;;


Well I created this console :)) So any fixes welcomed!


Issue is that it is using html formating for rich text. See how differently are processed plain/rich 
outputs from raw messages and how handlers are done...



I think, that the fact that the line jnlp is on one line deosnot metter. If you swithc to plaintext 
console, it is correct.
But I cannot survive, that formatting of anything after it is broken :(

Maybe adding <> escaping to console inisdes is the only way...


J.


More information about the distro-pkg-dev mailing list