Logging
Logging is crucial to know when certain things occur in the application or what errors happen. The guys from Monolog have done an outstanding job at their component. This logging component is a small wrapper around Monolog to easily integrate it with the rest of the system, but feel free to use it directly.
#
PurposeProvide a simple wrapper, utilities and ready-to-go loggers within the framework. As well as configurable system logging.
#
Native loggingSome native loggers come with the package. For more detailed information on usage see Monolog Documentation. This will be focused on added/Swift specific features.
#
AppLoggerLogs to a /var/app.log file.
#
DBLoggerLogs to the log table (Swift\Logging\Entity\LogEntity
).
#
SystemLoggerSystem logger is mainly meant for the system itself. When extending core functionality this is a useful place. Otherwise, use App/DB Logging or a custom logger.
#
ConfigurationAt this moment configuration is still limited. However it is possible to send logging notifications by mail for error levels from ERROR and higher. This configuration can be set in etc/app.yaml
#
Custom loggerEasily create your own logger by extending Swift\Logging\AbstractLogger
, this extends Monolog\Logger
with some useful functionality and e.g. dispatches certain events.