I have an error but I have not found how to solve it as such if not just how to cover the problem.
Log.e("APIComm:AssetsPropertyReader", e.toString());
Mark me the error,
The loggin tag can be at most 23 characters, was 26
I have an error but I have not found how to solve it as such if not just how to cover the problem.
Log.e("APIComm:AssetsPropertyReader", e.toString());
Mark me the error,
The loggin tag can be at most 23 characters, was 26
Remember that the maximum length is 23 characters in a tag (tag), otherwise you will get a IllegalArgumentException .
The definition of the tag (tag) is:
tag : Used to identify the origin of a message from registry. In general, identify the class or activity where produces the registration call.
In this case the problem is the length of your tag "APIComm:AssetsPropertyReader"
, reduced to 23 characters or less , for example:
error:
Log.e("APIComm:AssetsPropertyReader", e.toString());
option:
Log.e("APIComm:AssetsPropRead", e.toString());
On the documentation you can review the comments above.
It is worth mentioning that in android 7.0 (Nougat), this length is no longer a concern, if you define in your project targetSdk 24
you can without problems add the desired number of characters in TAG
, of your message to show in the LogCat
.
The solution tells you in the same error, the tag can not have more than 23 characters. That is, it can not have more than 23 letters, otherwise it will throw an exception.
The tag is the first parameter that receives the sentence:
Log.i("etiqueta", "mensaje de error);
Your problem is solved by shortening the label. Instead of using APIComm:AssetsPropertyReader
you can use APIComm:AssetsProperty
.
Log.e("APIComm:AssetsProperty", e.toString());