v0.4.0
Pre-release
Pre-release
This release contains a bunch of features that were a result of a refactor of the logging functionality to achieve configuration consistency.
General
- Errors that are focused at the user of the bundle are now all thrown as the new
BaseCommandException - [BC] A
BaseCommandExceptionis now thrown if the same command object is executed twice. This is a protection mechanism as the configuration and class variables are not reset in between executions and thus unintentionally running the same object twice will likely have unintended results. - The above protection mechanism can be explicitly disabled through the
setAllowMultipleExecution()function - It is now explicitly checked that the BaseCommand's version of the
configure()function is called in overridden versions of the function - Similarly it is checked the the
initialize()function inBaseCommandis also called to help the user in debugging why the bundle's functionality is not working - [BC] functions that are intended to only be used in the user's subclass (such as
setLogFilename()) have all had their visibility updated to protected to make the public interface of your command cleaner
Logging
getLogFilename()now takes an optional boolean parameter to return just the filename. Previously it also included the full path to the file which meant that is was to symmetric withsetLogFilename()- the default file extension can be set per command using
setDefaultLogFileExtension() - logging to file can be disabled per command using
setLogToFile() - The log LineFormat can be defined per command using
setFileLogLineFormat()andsetConsoleLogLineFormat(). NULL is a valid value for both functions if you would like to revert of Monolog's default format - [BC] The misspelt
file_extentionconfiguration option has been fixed to befile_extension - [BC] The node for configuring logging to file has been renamed from
defaulttofile_stream - The name of the log file can be changed for a single execution using the
--log-filenameparameter