Wiki
Clone wikiParsley-Spicelib-complete / Home
Command enhancements in 3.0.1
This is a provisional documentation of command enhancements in a 3.0.1
branch.
Logging improvements
The default log output in 3.0.0 is not very helpful as it outputs [AsyncCommand]
for almost everything that flows through the system. One of the goals of 3.0.1 is therefore to significantly improve the log output. Here is what has been done:
-
Implemented
toString()
overrides in many subclasses so that a useful information is printed out. This is not automatic as Parsley wraps commands in command proxies and sometimes even in further objects so the default output was too generic. -
When command groups and flows are given an ID in an MXML configuration, it is now used to aid the log output. This is useful because CommandSequence can by default output only something like
executing [CommandSequence] with 3 commands
With the help of an ID, the output may look something like
executing [CommandSequence loginSequence] with 3 commands
which is better. Use IDs to your advantage.
-
Logs coming from command flow now use the INFO level (used to be a mixture of DEBUG and INFO messages)
API changes
- New
Command#description
property. Details:- This used to be a private variable of
AbstractAsyncCommand
which was not very useful for providing subclasses a chance to write better output intoString()
. The current design fixes it. - For group and flow commands defined in MXML, the
description
property is filled with theid
property if it is provided. This was the easiest way of how to aid log output without making too many changes to all sorts of classes. It would probably be more proper if configuration tags supporteddescription
property themselves, this would be a possible improvement to a future release.
- This used to be a private variable of
Updated