Re: [android-developers] Re: print integer value in logcat.

2012-09-12 Thread Sudarshan Bhat
You can otherwise just append a empty string. Log.d("tag", "" + 5); On 11 September 2012 18:14, pharaoh wrote: > Try this solution : > (...) > int age = 22; > Log.d(MY_TAG, new Integer(age).toString()); > (...) > > Segunda-feira, 10 de Setembro de 2012 13:22:47 UTC+1, mohammed Nuhail > escreveu:

Re: [android-developers] Re: print integer value in logcat.

2012-09-12 Thread pharaoh
Thanks for pointing that out! I wasn't aware of the existence of that method. Terça-feira, 11 de Setembro de 2012 14:29:10 UTC+1, andrewg_oz escreveu: > > > > On 11 September 2012 20:44, pharaoh >wrote: > >> Try this solution : >> (...) >> int age = 22; >> Log.d(MY_TAG, new Integer(age).toString

[android-developers] Re: print integer value in logcat.

2012-09-12 Thread Lew
Lew wrote: > > jb wrote: >> >> Most simple approach: >> >> int x; >> System.err.println("x="+x); >> >> Will show in LogCat. >> > > Not normally, no, it won't. > > "By default, the Android system sends stdout and stderr (System.out and > System.err) output to /dev/null." > http://developer.an

[android-developers] Re: print integer value in logcat.

2012-09-11 Thread Jan Burse
Lew schrieb: That is not an advantage, and the concomitant > loss of information is a disadvantage. Oh, you made it from comp.lang.java.programmer to here? Not enough troll opportunities anymore there? -- You received this message because you are subscribed to the Google Groups "Android Develo

[android-developers] Re: print integer value in logcat.

2012-09-11 Thread Lew
jb wrote: > > Most simple approach: > > int x; > System.err.println("x="+x); > > Will show in LogCat. > Not normally, no, it won't. "By default, the Android system sends stdout and stderr (System.out and System.err) output to /dev/null." http://developer.android.com/tools/debugging/debuggi

Re: [android-developers] Re: print integer value in logcat.

2012-09-11 Thread Lew
That is not an advantage, and the concomitant loss of information is a disadvantage. bob wrote: > > This way he only has to specify one parameter. > On Monday, September 10, 2012 8:22:08 AM UTC-5, Raghav Sood wrote: >> >> Why would you use that when you have a perfectly working LogCat class? >>

Re: [android-developers] Re: print integer value in logcat.

2012-09-11 Thread bob
This way he only has to specify one parameter. On Monday, September 10, 2012 8:22:08 AM UTC-5, Raghav Sood wrote: > > Why would you use that when you have a perfectly working LogCat class? > > What's wrong with Log.i("value =" + intName);? > > Raghav Sood > Sent from my Galaxy Nexus > On

[android-developers] Re: print integer value in logcat.

2012-09-11 Thread Lew
pharaoh wrote: > > Try this solution : > (...) > int age = 22; > Log.d(MY_TAG, new Integer(age).toString()); > (...) > Really? Not 'String.valueOf(age)'? Not even 'Integer.valueOf(age).toString()'? We're talking basic Java here. -- Lew -- You received this message because you are subscribe

Re: [android-developers] Re: print integer value in logcat.

2012-09-11 Thread Raghav Sood
My mistake. Sorry. I was typing on a mobile, and the tag slipped my mind. Raghav Sood Sent from my Nexus 7 On Sep 11, 2012 6:26 PM, "Jan Burse" wrote: > Raghav Sood schrieb: > >> Why would you use that when you have a perfectly working LogCat class? >> >> What's wrong with Log.i("value =" + intN

Re: [android-developers] Re: print integer value in logcat.

2012-09-11 Thread Andrew Gregory
On 11 September 2012 20:44, pharaoh wrote: > Try this solution : > (...) > int age = 22; > Log.d(MY_TAG, new Integer(age).toString()); > (...) > > That's a wasted allocation when there's a static toString: Log.d(MY_TAG, Integer.toString(age)); -- Andrew -- You received this message because y

[android-developers] Re: print integer value in logcat.

2012-09-11 Thread Jan Burse
Raghav Sood schrieb: Why would you use that when you have a perfectly working LogCat class? What's wrong with Log.i("value =" + intName);? Raghav Sood Sent from my Galaxy Nexus Nothing wrong, except that it will not compile. I guess you would need to put: Log.i(TAG, "value =" + int

[android-developers] Re: print integer value in logcat.

2012-09-11 Thread pharaoh
Try this solution : (...) int age = 22; Log.d(MY_TAG, new Integer(age).toString()); (...) Segunda-feira, 10 de Setembro de 2012 13:22:47 UTC+1, mohammed Nuhail escreveu: > > How to print integer value in LogCat ? > -- You received this message because you are subscribed to the Google Groups "An

Re: [android-developers] Re: print integer value in logcat.

2012-09-10 Thread Raghav Sood
Why would you use that when you have a perfectly working LogCat class? What's wrong with Log.i("value =" + intName);? Raghav Sood Sent from my Galaxy Nexus On Sep 10, 2012 6:48 PM, "Jan Burse" wrote: > Most simple approach: > > int x; > System.err.println("x="+x); > > Will show in LogCat. > > m

[android-developers] Re: print integer value in logcat.

2012-09-10 Thread Jan Burse
Most simple approach: int x; System.err.println("x="+x); Will show in LogCat. mohammed Nuhail schrieb: How to print integer value in LogCat ? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-d