「App:Library:LVGL:docs:Porting:Logging」の版間の差分
78行目: | 78行目: | ||
For example: | For example: | ||
− | <syntaxhighlight lang="C++"> | + | <syntaxhighlight lang="C++" style="border: 1px dashed gray;"> |
void my_log_cb(const char * buf) | void my_log_cb(const char * buf) | ||
{ | { | ||
95行目: | 95行目: | ||
例えば: | 例えば: | ||
+ | <syntaxhighlight lang="C++" style="border: 1px dashed gray;"> | ||
void my_log_cb (const char * buf ) | void my_log_cb (const char * buf ) | ||
{ | { | ||
104行目: | 105行目: | ||
lv_log_register_print_cb (my_log_cb ); | lv_log_register_print_cb (my_log_cb ); | ||
+ | </syntaxhighlight> | ||
|} | |} | ||
:[[App:Library:LVGL:docs:Porting|戻る : Previous]] | :[[App:Library:LVGL:docs:Porting|戻る : Previous]] | ||
− | |||
== Add logs == | == Add logs == |
2022年6月23日 (木) 00:00時点における版
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) 。
|