search

Home  >  Q&A  >  body text

android - Log.wtf()跟Log.e() 这两个函数有什么区别

试了一下好像打印的东西都是一样的

PHP中文网PHP中文网2773 days ago679

reply all(4)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 17:18:08

    Yeah. . wtf means what a terrible failure
    terrible failure: reporting a situation that can never happen.

    Then this is the official original text:

    What a Terrible Failure: Report a condition that should never happen. The error will always be logged at level ASSERT with the call stack. Depending on system configuration, a report may be added to the DropBoxManager and/or the process may be terminated immediately with an error dialog.

    Probably used to print bugs that will never occur under normal circumstances?

    ps: not what the fuck_(:з ∠)_

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-17 17:18:08

    The error levels are different, Log.e代表错误级别的日志,Log.wtf是中断(ASSERT)级别的错误,毕竟是What The Fuck. It was a serious bug at first glance, so I cursed it.

    reply
    0
  • 高洛峰

    高洛峰2017-04-17 17:18:08

    Log.e就是单纯的错误。
    Log.wtf会优先断言(ASSERT), and if you configure it, an error report will be generated, and then the program will end.

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-17 17:18:08

    官方文档:
    wtf:
    What a Terrible Failure: Report a condition that should never happen. The error will always be logged at level ASSERT with the call stack. Depending on system configuration, a report may be added to the DropBoxManager and/or the process may be terminated immediately with an error dialog.


    e:
    Send an ERROR log message.

    reply
    0
  • Cancelreply