Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
439 views
in Technique[技术] by (71.8m points)

android - How does Log.wtf() differ from Log.e()?

I have looked at the documentation for android.util.Log and I'm not sure exactly what the difference between Log.e() and Log.wtf() is. Is one preferred over the other? Is there a functionality difference? Surely they aren't redundant.

Note to future readers: At the time this question was asked, the documentation for this was much less clear. If you follow the link above, they have fixed the problem.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

There is a difference in severity;

Log.e() will simply log an error to the log with priority ERROR.

Log.wtf() will log an error with priority level ASSERT, and may (depending on the system configuration) send an error report and terminate the program immediately.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...