2011-06-03 144 views
0

我正在嘗試顯示opencore日誌。我已經嘗試過ff。但仍然沒有在logcat中顯示日誌。

1.在SD卡中創建了pvlogger.txt,仍然沒有用。
#echo 8> /sdcard/pvlogger.txt
2.在pvlogger.h文件中編輯PV_LOG_INST_LEVEL從0到5,但會導致編譯失敗。
「/android_log_appender.h:75:錯誤:」format not a string literal and no format argument「
所以我剛剛註釋掉了第75行,雖然編譯成功,opencore的日誌仍然沒有顯示在logcat中

Android顯示OpenCore日誌

是否有任何人誰能夠顯示的OpenCore日誌?提前

感謝。

artsylar

回答

0

經過試驗和錯誤,我終於能夠顯示OpenCore日誌消息!儘管我還不知道是否需要步驟4和選項,但我做了這些。

  1. 新增#define PV_LOG_INST_LEVEL 5到\機器人\外部\的OpenCore \機器人\ thread_init.cpp文件。
  2. 解決「/android_log_appender.h:75:錯誤:」格式字符串不是一個字面,沒有格式參數」錯誤,只需編輯\外部\的OpenCore \機器人\ android_log_appender.h線75從LOGE(的StringBuf)至LOGE("%s", stringbuf)
  3. 編譯代碼。
    make ENABLE_PV_LOGGING=1
  4. 在SD卡創建pvlogger.txt。
    # echo 8 > /sdcard/pvlogger.txt



1

我在三個月前遇到過這個問題。請不要在/android_log_appender.h中註釋掉LOGE(stringbuf),否則不會註銷。 LOGE("%s", stringbuf)而不是LOGE(stringbuf)

1. created pvlogger.txt in sdcard and still no use. 
    `# echo 8 > /sdcard/pvlogger.txt` 
2. Edited the PV_LOG_INST_LEVEL from 0 to 5 in the pvlogger.h. 
3. ENABLE_PV_LOGGING from 0 to 1 in the pvlogger.h. 
4. LOGE("%s", stringbuf) instead of LOGE(stringbuf) in /android_log_appender.h. 

Wish you success!