Dave Miner wrote:
> Glenn Lagasse wrote:
>> Hi Jan,
>>
>> * Jan Damborsky (Jan.Damborsky at Sun.COM) wrote:
>>  
>>> Hi Karen, Glenn,
>>>
>>> confirming that changeset 635 is the culprit :-)
>>>
>>> No doubt that 'pkg' prefix in DC log is confusing and has to be 
>>> removed.
>>> WRT having the command logged, I would like to check if it is in 
>>> general
>>> something which could be acceptable in DC log.
>>> I am asking, since it is useful source of information in installer case
>>> and if something fails, there is an easy way to exactly reproduce 
>>> the set
>>> of steps which led to the failure.
>>>
>>> Thinking about solution, we could
>>>
>>> [1] Repair the prefix
>>> [2] Avoid logging the command in DC case
>>> [3] Remove logging the command completely from  
>>> exec_cmd_outputs_to_log()
>>>
>>> Please let me know what you think.
>>
>> I like option 1 but I think we could go further.  Some of the log
>> messages that are now showing up in the DC detailed log don't seem to be
>> terribly useful imho.  Specifically the messages that list what
>> finalizer script is being called and what arguments it was passed.
>> These messages really clutter up the detailed log and makes reading it
>> pretty difficult.  Is it possible to suppress these types of messages
>> unless specifically asked for (via some mechanism)?
>>
>> My .02.
>>
>
> This discussion leads me to believe that we need to consider whether 
> having two logs is still the right choice, and what they might 
> contain.  Perhaps someone would like to take a crack at that?
>
> Dave
>
Background on why we have the 2 logs.
When we designed logging for DC, we believe that having the simple log, 
which
contains a subset of the messages from the detail log will allow users 
to more easily
observe the progress of the build and identify any errors that comes 
up.  The messages
that got displayed on the terminal of a DC run are the same ones that 
got captured
in the simple log.  This is believed to be useful for cases where DC 
runs are executed
from headless systems where capturing the output from a terminal is not 
easy.

 From implementation point of view, Python logging allows us to have all 
the logs
we do today for almost zero cost.  It's just a matter of adding the 
couple of lines
to indicate where is the location of the log file, and what level of 
message we want
to capture.

Given the above, I feel that having the 2 log files is useful.  All 
output from a DC run must
be captured, so, we must have the detail log, which contains a lot of 
information.
The simple log is useful for providing a summary, for those that don't 
need to
worry about the details.

In regards to printing out the exact command being executed, I feel 
that's very useful
information to be captured.  When I debug, I often have to change the 
logging function so
the the command gets printed.  So, I support logging the command in the 
detail log only.
That will add a lot of output to the detail log for sure,  perhaps 
additional blank lines
in the file will help with making it easier to read?  For example, have 
blank lines
printed in front of the command being executed.  That way, each command, 
and the output
from it will form it's own block in the log file, which should help with 
readability.

Thanks,

--Karen



Reply via email to