「App:Library:LVGL:docs:Porting:Logging」の版間の差分
1行目: | 1行目: | ||
https://docs.lvgl.io/8.2/porting/log.html | https://docs.lvgl.io/8.2/porting/log.html | ||
__NOTOC__ | __NOTOC__ | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
= Logging = | = Logging = | ||
{| class="wikitable" | {| class="wikitable" |
2022年6月29日 (水) 14:46時点における版
https://docs.lvgl.io/8.2/porting/log.html
Logging
英文 | 自動翻訳 |
---|---|
LVGL has a built-in Log module to inform the user about what is happening in the library. |
LVGLには、ライブラリで何が起こっているかをユーザーに通知するため の組み込みのログモジュールがあります。 |
Log level
英文 | 自動翻訳 |
---|---|
To enable logging, set
|
ロギングを有効にするには、次のいずれかの値に設定LV_USE_LOG 1 しlv_conf.h て設定LV_LOG_LEVEL します。
設定されたログレベルよりも高いレベルのイベントもログに記録されます。たとえば |
Printing logs
Logging with printf
英文 | 自動翻訳 |
---|---|
If your system supports |
システムがをサポートしている場合は、でログを送信するためにを有効にprintf する必要があります。 LV_LOG_PRINTFlv_conf.hprintf
|
Custom log function
英文 | 自動翻訳 |
---|---|
If you can't use
void my_log_cb(const char * buf)
{
serial_send(buf, strlen(buf));
}
...
lv_log_register_print_cb(my_log_cb);
|
例えば: void my_log_cb (const char * buf )
{
serial_send (buf 、 strlen (buf ));
}
...
lv_log_register_print_cb (my_log_cb );
|
Add logs
英文 | 自動翻訳 |
---|---|
You can also use the log module via the |
関数を介してログモジュールを使用することもできますLV_LOG_TRACE/INFO/WARN/ERROR/USER(text) 。
|