Log files
- Consider ways to make logs available to users:
Keep logs in a predefined location
Email logs to tool user
- Progress Logs:
Consider the location/directory, is it accessible?
What is the naming convention you want to use?
What do you want to track?
How much information included in each progress statement?
Do you want to retain the log if tool is successful?
- Error Logs
What is the naming convention you want to use?
Do you want to combine it with the progress log or make a separate error log?
Consider the location/directory, is it accessible?
What impact does log output have on tool performance?
Should you offer ways to configure verbosity levels?
Should you offer an option to turn logging on and off?
- Error messages
What information should be included in the error messages?
How should the error message be formatted and presented to the user?
Should any text be filtered out?
Example of unfiltered error message:Uncaught exception from user code:XY_COM_HRESULT (HRESULT=0xe000|109):thrown at: file /pdm/clients/clientapi/orb/perllib/PCMtoolsAPI/PCMcommand.pm, line 122 (pkg PCMtoolsAPI::PCMcommand)ErrMsg: Server side portal error:*|000001|000045|*/Global/sysadmin/xxx (/#1/#2/#??): Not FoundServer Stack:at com.xyenterprise.PCMPortal.IDS.THROW__IDS_PORTALSRVERR(IDS.java:135)at com.xyenterprise.PCMPortal.PortalSrv.SndRcv(PortalSrv.java:601)at com.xyenterprise.PCMPortal.PortalSrv.SimpleExecute(PortalSrv.java:350)at com.xyenterprise.PCMPortal.PortalPOATie.SimpleExecute(PortalPOATie.java:70)at com.xyenterprise.PCMPortal._PortalStub.SimpleExecute(Compiled Code)at com.xyenterprise.PCMtoolsAPI.PCMcommandSrv.SimpleExecCmd(PCMcommandSrv.java:234)at com.xyenterprise.PCMtoolsAPI.PCMcommandSrv.SimpleSelect(PCMcommandSrv.java:311)at com.xyenterprise.PCMtoolsAPI.PCMcommandSrv.Select(PCMcommandSrv.java:299)at com.xyenterprise.PCMtoolsAPI.PCMcommandPOATie.Select(PCMcommandPOATie.java:490)at com.xyenterprise.PCMtoolsAPI.PCMcommandPOA._invoke(PCMcommandPOA.java:1558)at jacorb.poa.RequestProcessor.invokeOperation(RequestProcessor.java:206)at jacorb.poa.RequestProcessor.process(Compiled Code) at jacorb.poa.RequestProcessor.run(Compiled Code) Experimental::Exception::die('XY_COM_HRESULT=HASH(0x126534)') called at /etc/xyvision/common/perl/lib/site_perl/5.6.0/sun4-solaris/Experimental/Exception.pm line 239 Experimental::Exception::throw('XY_COM_HRESULT=HASH(0x126534)') called at /etc/xyvision/common/perl/lib/site_perl/5.6.0/COPE/CORBA/Request.pm line 198 CORBA::Request::invoke('CORBA::Request=HASH(0xa013b8)', 0) called at /pdm/clients/clientapi/orb/perllib/PCMtoolsAPI/PCMcommand.pm line 122 PCMtoolsAPI::PCMcommand::Select('PCMtoolsAPI::PCMcommand=HASH(0x126474)', 'xxx') called at testapi.pl line 26main::__ANON__() called at /pdm/encaps/XyEnterprise/Root/XyException.pm line 356eval {...} called at /pdm/encaps/XyEnterprise/Root/XyException.pm line 355 XyEnterprise::Root::XyException::subs::try('CODE(0x10f16c)', 'HASH(0x12aea8)') called at testapi.pl line 34Example of filtered error message; exception from user code:XY_COM_HRESULT (HRESULT=0xe000|109): thrown at: file /pdm/clients/clientapi/orb/perllib/PCMtoolsAPI/PCMcommand.pm, line 122 (pkg PCMtoolsAPI::PCMcommand) ErrMsg: Server side portal error: *|000001|000045|*/Global/sysadmin/xxx (/#1/#2/#??): Not Found - Error handling
Determine fatal errors versus those from which the tool can continue.
What clean up can/should the tool do if there is a failure?
Is there manual clean up that the user will have to do before re-running the tool?