- Drupal 8 Module Development
- Daniel Sipos
- 191字
- 2021-07-02 15:45:20
Logging summary
In this first section, we saw how logging works in Drupal 8. Specifically, we covered few theories so that you understand a bit how things play together and you don't just mindlessly use the logger factory without actually having a clue what goes on under the hood.
As examples, we created our own logging channel, which allows us to inject it wherever we need without having to always go through the factory. We will use this channel going forward for the Hello World module. Additionally, we created our own logger implementation. It won't do much at the moment, except getting registered, but we will use it in the next section to send emails when errors get logged to the site.
Finally, we used the logging framework (and our channel) in our salutation configuration form to log a message whenever the form is submitted. In doing so, we also passed the message that was saved so that it also gets included in the log. This should already work with the database log so go ahead and save the configuration form and then check the logging UI for that information message.
- JSP網絡編程(學習筆記)
- CMDB分步構建指南
- Cocos2d-x游戲開發:手把手教你Lua語言的編程方法
- Reactive Programming with Swift
- Visual C++數字圖像模式識別技術詳解
- 基于差分進化的優化方法及應用
- Hadoop+Spark大數據分析實戰
- Mastering macOS Programming
- 人人都懂設計模式:從生活中領悟設計模式(Python實現)
- QTP自動化測試進階
- Oracle從入門到精通(第5版)
- Oracle 18c 必須掌握的新特性:管理與實戰
- 時空數據建模及其應用
- OpenCV with Python By Example
- 跟戴銘學iOS編程:理順核心知識點