1 unit log; 2 {$ifdef fpc} 3 {$mode delphi} 4 {$endif} 5 6 interface 7 8 const libname='liblog.so'; 9 10 ANDROID_LOG_UNKNOWN=0; 11 ANDROID_LOG_DEFAULT=1; 12 ANDROID_LOG_VERBOSE=2; 13 ANDROID_LOG_DEBUG=3; 14 ANDROID_LOG_INFO=4; 15 ANDROID_LOG_WARN=5; 16 ANDROID_LOG_ERROR=6; 17 ANDROID_LOG_FATAL=7; 18 ANDROID_LOG_SILENT=8; 19 20 type android_LogPriority=integer; 21 __android_log_writenull22function __android_log_write(prio:longint;tag,text:pchar):longint; cdecl; external libname name '__android_log_write'; LOGInull23function LOGI(prio:longint;tag,text:pchar):longint; cdecl; varargs; external libname name '__android_log_print'; 24 25 procedure LOGW(Text: pchar); __android_log_printnull26//function __android_log_print(prio:longint;tag,print:pchar;params:array of pchar):longint; cdecl; external libname name '__android_log_print'; 27 28 implementation 29 30 procedure LOGW(Text: pchar); 31 begin 32 __android_log_write(ANDROID_LOG_FATAL,'crap',text); 33 end; 34 35 end. 36