- 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.
- Linux核心技術從小白到大牛
- Python Game Programming By Example
- FFmpeg入門詳解:音視頻流媒體播放器原理及應用
- Learning Linux Binary Analysis
- 老“碼”識途
- Java程序設計入門
- C/C++程序員面試指南
- Python Data Science Cookbook
- Emgu CV Essentials
- Essential C++(中文版)
- Getting Started with Python and Raspberry Pi
- Arduino計算機視覺編程
- 視窗軟件設計和開發自動化:可視化D++語言
- 分布式數據庫HBase案例教程
- Kotlin語言實例精解