Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-core-dev] RFC 0003 - Log File Retrieval

I have added a link to a sample log file in the RFC, so you can all judge
if it's more or less readable.  It wouldn't be ideal to write two files
with the same information in them, although there are pros and cons for
both formats.  For example, previously you'd get:

Log: Fri Nov 30 16:05:25 EST 2001
4 org.eclipse.xyz.SomePlugin 1 The Foo operation failed to complete.
Stack trace:
...

In XML you'd get:

<log-entry date="Fri Nov 30 16:05:25 EST 2001">
  <status
     plugin-id="org.eclipse.xyz.SomePlugin"
     severity="ERROR"
     message="The Foo operation failed to complete."
     code="1">
     <exception
         message="Failed to write because the disk has no more space."
         trace="
...
    </exception>
  </status>
</log-entry>

In the original, the second line has several pieces of information stuck
together; it doesn't tell you what the bits of information are,
particularly what "4" and "1" mean.  The XML also now includes the
exception message, which was previously missing.  The XML file is more
understandable, but much more verbose.  Perhaps the XML file could be cut
down a bit:

<log-entry date="Fri Nov 30 16:05:25 EST 2001">
  <status id="org.eclipse.xyz.SomePlugin" sev="ERROR" msg="The Foo
operation failed to complete." code="1">
     <exception msg="null" trace="
...
    </exception>
  </status>
</log-entry>

However, once this API has been added, it will be much easier to use a
UI-based log display, such as the one provided in PDE.  The log view would
have "clear" and "restore" buttons, and has a nice tabular display.  Most
importantly, it will also be able to show you log entries that occurred
before the view opened.  With a nice log view, it won't be so important to
have the file on disk in an easy to read format.

It's true that changing the log file name would cause initial confusion for
users.  Most people know to search for ".log" by now.  Maybe as a temporary
measure, the platform could automatically write a .log file that just says,
"The log is now in a file called log.xml", or something similar.




                                                                                                                    
                    "Rodrigo Peretti/OTT/OTI"                                                                       
                    <Rodrigo_Peretti@xxxxxxx>        To:     platform-core-dev@xxxxxxxxxxx                          
                    Sent by:                         cc:                                                            
                    platform-core-dev-admin@e        Subject:     Re: [platform-core-dev] RFC 0003 - Log File       
                    clipse.org                       Retrieval                                                      
                                                                                                                    
                                                                                                                    
                    11/30/2001 03:28 PM                                                                             
                    Please respond to                                                                               
                    platform-core-dev                                                                               
                                                                                                                    
                                                                                                                    



I really liked the idea of having the log file in XML format. Here are
some comments:

1) Instead of changing the format to XML, we should just have an
additional log.xml file as well as the current .log file. The current
format is much easier for humans to read (and currently helps a lot) than
if you add a bunch of XML tags to it.

2) Minor: I would prefer the names to be .log and log.xml. But I don't
really mind about changing it.

Rodrigo





Back to the top