It is possible to access your apps logs with LogCat from the Phone library. Note that it doesn't require any permission however you cannot use it to read the logs of other apps. The LogCatData event is raised on a different thread. This makes it a bit more difficult to work with this event if...
This will work in B4A and B4J, it will log the underlying Java stack:
B4X:
Sub LogStackTraceDim jo As JavaObjectDim stack() As Object = jo.InitializeStatic("java.lang.Thread").RunMethodJO("currentThread", Null).RunMethod("getStackTrace", Null)
ForEach st As JavaObjectIn stack
Log(st.RunMethod("getClassName", Null) & ": " & st.RunMethod("getMethodName", Null))
NextEndSub
It is possible to access your apps logs with LogCat from the Phone library. Note that it doesn't require any permission however you cannot use it to read the logs of other apps. The LogCatData event is raised on a different thread. This makes it a bit more difficult to work with this event if...
thanks Manfred
i don't access to log but simply i need to know what is sub tha have called a second sub from second sub
for example
i have a pubblic sub named Log_generic that is called some times.
From this sub i need to know who have calledit without pass subFrom parameter if possible.
B4X:
sub s1
msgbox("first sub","")
log_Generic("s1","detail of log..")
endsub
sub log_Generic(subFrom as String, LogData as String)
'i need here to know subFrom without pass the parameter if possibleLOG($"
Procedure: ${subFrom}
Detail: ${logData}
"$)
endsub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.