[izpack-devel] FW: Logging

Bartz, Klaus Klaus.Bartz at coi.de
Thu Nov 30 09:14:15 CET 2006


Hi Elmar,
is it possible to add an "identifier" to the message slot like

void Logger.getInstance().setMessage(String loggingSlot, String msg, Throwable who)

or
public final static int ERROR = 0;
public final static int WARNING = 1;
public final static int MESSAGE = 2;
void Logger.getInstance().set(int type, String loggingSlot, String msg, Throwable who)

loggingSlot and who can be null.

The dumping of slot contents for MESSAGE can be triggert by command line
(e.g. string of comma separated identifier).
In opposite to log4j (if I have understand it right) there is no hierarchy else
special informations can be selective dumped out.
With such a mimik it is possible to log more informations without making the
log blind bend and discussions about logged informations can be easier
blocked. 
It can be simple enough to impl it self in opposite to use log4j (I do not like
log4j :-)).

Cheers

Klaus

>-----Original Message-----
>From: izpack-devel-bounces at lists.berlios.de
>[mailto:izpack-devel-bounces at lists.berlios.de]On Behalf Of Elmar Grom
>Sent: Wednesday, November 29, 2006 11:37 PM
>To: Izpack
>Subject: [izpack-devel] FW: Logging
>
>
>Klaus,
>
>you make a good point here. Users might not be happy about a load of
>messages, even if they are all good.
>
>The logger works as follows:
>
>1) log messages are posted by calls to the logger
>2) there are three categories of messages: messages, warnings 
>and errors
>3) the logger simply collects the messages but takes no further action
>4) the logger provides information if any warnings or errors have been
>posted
>5) the installer uses this information to display an 
>appropriate generic
>message (probably in the finish panels) -> (success, possible problems,
>install failed)
>6) a button will be provided to allow the user to save a 
>detailed report
>7) when asked to save a report, the logger produces a report 
>with generic
>information about the install plus all messages posted. The 
>messages are
>sorted by category (message/warning/error) and they are localized.
>
>In this way the user is never bombarded with a flood of 
>messages that might
>only succeed in leaving doubt about the success of the operation, even
>though they might be completely meaningless. If necessary the 
>report text
>file may be e-mailed to the developer.
>
>Because of your input, I think it might be a good idea to 
>allow developers
>to decide if logging is actually turned on and perhaps even to 
>what level.
>This could be done by a top level switch in the xml file. Even 
>if this is
>done, there might be cases where an installation problem might 
>need to be
>debugged. For such cases logging might be forced on by a command line
>switch.
>
>Here is what a report looks like right now. The message and 
>warning section
>would not show up at all if there is nothing recorded, I just 
>wanted to show
>what it would look like.
>
>---------------------------------------------------------------
>-------------
>---
>                           IzPack INSTALLATION REPORT
>---------------------------------------------------------------
>-------------
>---
>
>WARNING!!! The installation did not succeed!
>
>This report contains 0 general message(s), 0 warning(s) and 1 error(s)
>
>Installation report for : ProScholar Version 2.2
>Install time            : 11-29-2006 [14:29:37]  Pacific Standard Time
>Install directory       : D:\ProgramFiles\ProScholar
>
>                         --- Installation Messages ---
>
>Message  [0] - ...
>
>                               --- Warnings ---
>
>Warning [0] - ...
>
>                                --- Errors ---
>
>Error [0] - unable to write 'D:\ProgramFiles\ProScholar\app.jar'
>---------------------------------------------------------------
>-------------
>---
>
>
>Cheers
>
>	Elmar
>
>-----Original Message-----
>From: Bartz, Klaus [mailto:Klaus.Bartz at coi.de]
>Sent: Wednesday, November 29, 2006 1:13 AM
>To: elmar at grom.net; izpack-devel at lists.berlios.de
>Subject: RE: [izpack-devel] Logging
>
>
>Hi Elmar,
>I think all developer of IzPack knows that there are some
>points in the product which are not optimal solved. Of course,
>we should solve it if possible and time is right on work-time-device.
>
>Some weeks ago I have had a little problem with logging; I log
>some things which are interested especially for me, but it will be
>logged if logging is activated. One user persisted on the
>meaning that the logged information was fatal for IzPack.
>
>Therefore it will be nice if the new logging stuff will be support
>different topics (as you have decribed) and logs a prefix. May be
>configurable what topic should be logged.
>
>Cheers
>
>Klaus
>
>_______________________________________________
>izpack-devel mailing list
>izpack-devel at lists.berlios.de
>https://lists.berlios.de/mailman/listinfo/izpack-devel
>



More information about the izpack-devel mailing list