[PATCH] Allow logging of {pre,post}remove scripts

Robert Collins rbcollins@cygwin.com
Mon Mar 31 23:45:00 GMT 2003


On Tue, 2003-04-01 at 09:31, Igor Pechtchanski wrote:


> 
> Rob,
> 
> The reason I wanted to keep the to_log parameter is that I wanted to keep
> the code around that directs output to console.  If there are no
> objections, I'll just make the default value of to_log TRUE, and remove
> the third parameter from the calls.  I'd like to keep the parameter for
> now, though.

We're not using that plain code today.

CVS will keep it forever, but I don't want setup kept more complex than
it needs to be.

Here are some options I'll accept:
option A) Make output a Strategy of the script object. Allow the output
strategy to determine window sizing and logging (or not). (This would
probably be three patchs:
patch 1)
 - Extend Script to have more responsibilities from the non OOP script
code.
patch 2)
 - Give it a base strategy class for logging, containing the current if
(to_log) conditionals, and a boolean in the constructor.
patch 3)
 - Create a subclass of the strategy for logging to files.
 - Create another subclass for logging to console.
 - Make the base strategy methods pure virtual as appropriate.
 - Only link in the log to file strategy.

option B) Strip out the unused code.

Leaving the code there, simply so that it's there doesn't make sense.
I'll accept 'leave it there so we can do X in the future' - in which
case option A above is an easy path to separate out the two bits of code
and allow X. But leaving it there for no purpose doesn't make sense to
me.

Rob

-- 
GPG key available at: <http://users.bigpond.net.au/robertc/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20030331/d169059b/attachment.sig>


More information about the Cygwin-apps mailing list