반응형

 

Log.e(Error) static int Log.e (String tag, String msg [, Throwable tr]) 

 

This is for when bad stuff happens. Use this tag in places like inside a catch statement. You know that an error has occurred and therefore you're logging an error.

-> error 용 로그입니다. 보통 exception 이 발생하거나 Error 가 발생할 경우 system도 해당 로그를 활용한다.

색깔은 빨간색입니다.

 

 

Log.w(Warningstatic int Log.w (String tag, String msg [, Throwable tr]) 

Use this when you suspect something shady is going on. You may not be completely in full on error mode, but maybe you recovered from some unexpected behavior. Basically, use this to log stuff you didn't expect to happen but isn't necessarily an error. Kind of like a "hey, this happened, and it's weird, we should look into it."

-> 경고를 표시합니다. 보통 exception 이 발생했을 때 자주 쓰입니다. ( error 와 구분. )

색깔은 주황색입니다.

 

 

Log.i(Infostatic int Log.i (String tag, String msg [, Throwable tr]) 

Use this to post useful information to the log. For example: that you have successfully connected to a server. Basically use it to report successes.

-> 일반 정보를 표시할 때 사용됩니다.

색깔은 초록색입니다.

 

 

Log.d(Debugstatic int Log.d (String tag, String msg [, Throwable tr])

 

Use this for debugging purposes. If you want to print out a bunch of messages so you can log the exact flow of your program, use this. If you want to keep a log of variable values, use this.

-> debug 용 로그입니다.

DDMS Logcat 상에는 검정색 파란색으로 출력됩니다.

 

 

Log.v(Verbose) static int Log.v (String tag, String msg [, Throwable tr]) 

Use this when you want to go absolutely nuts with your logging. If for some reason you've decided to log every little thing in a particular part of your app, use the Log.v tag.

-> 개발중 특정 값을 확인하고 싶거나 할 때 나타내는 용도의 로그입니다.

색깔은 검정색입니다.

 

https://developer.android.com/reference/android/util/Log

 

Log  |  Android Developers

Log public final class Log extends Object java.lang.Object    ↳ android.util.Log API for sending log output. Generally, you should use the Log.v(), Log.d(), Log.i(), Log.w(), and Log.e() methods to write logs. You can then view the logs in logcat. The orde

developer.android.com

 

반응형