[android-developers] Re: Why don't System.err and System.out point to the console?
> I've redirected STDOUT/STDERR and I'm getting tons of these messages > when running logcat: > > W/dalvikvm( 739): read stdout: (17,512) failed (0): Unknown error: 0 > W/dalvikvm( 739): read stdout: (17,512) failed (0): Unknown error: 0 > > Are you guys having the same issue? I've seen that too, and didn't figure out an answer. -- David N. Welton http://www.welton.it/davidw/ http://www.dedasys.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Why don't System.err and System.out point to the console?
I don't believe that log4j is supported. I wrote a simple, nifty wrapper for android Log, and it works really well with their filitering features: http://groups.google.com/group/android-developers/browse_frm/thread/fd7cb81eb02af048/ I evangelize it. Jim On Apr 8, 10:21 am, kobica <[EMAIL PROTECTED]> wrote: > Speaking of logging, is there a problem using Log4J with Android. > > I've redirected STDOUT/STDERR and I'm getting tons of these messages > when running logcat: > > W/dalvikvm( 739): read stdout: (17,512) failed (0): Unknown error: 0 > W/dalvikvm( 739): read stdout: (17,512) failed (0): Unknown error: 0 > > Are you guys having the same issue? > > Thanks, > Kobi. > > On Apr 5, 12:50 pm, "Dan U." <[EMAIL PROTECTED]> wrote: > > > I also would have preferred for the normal use of System.out and > > System.err, but the Android way does force developers to use a more > > proper logging api which is not necessarily a bad thing. > > > On Apr 5, 8:20 am, Anil <[EMAIL PROTECTED]> wrote: > > > > I don't think you understood my suggestion. Even if it is Dalvik, it > > > can behave in a standard manner that a generation of Java programmers > > > expects. After all, we are using Java 1.5. There is a further benefit > > > in production as listed above. > > > > On Apr 4, 11:56 pm, Andrex <[EMAIL PROTECTED]> wrote: > > > > > It's because the Android code isn't really Java, it's Dalvik, and the > > > > Android emultator makes you report those things to the Dalvik output. > > > > You yourself listed the process to print errors there, I suggest you > > > > use it. ;) > > > > > On Apr 4, 7:34 pm, Anil <[EMAIL PROTECTED]> wrote: > > > > > > It would be good for Android phones to have a rolling log file that > > > > > doubles as a console. > > > > > That way, when there are problems with applications in production, the > > > > > user can simply push the logs to a server - just as Microsoft does > > > > > now. > > > > > It is weird for developers to not have familiar tools like > > > > > e.printstacktrace() or System.out.println(). > > > > > Instead we have something rather inconvenient to use: > > > > > >http://code.google.com/android/reference/adb.html > > > > > > "By default, the Android system sends stdout and stderr (System.out > > > > > and System.err) output to /dev/null. In processes that run the Dalvik > > > > > VM, you can have the system write a copy of the output to the log > > > > > file. In this case, the system writes the messages to the log using > > > > > the log tags stdout and stderr, both with priority I. > > > > > > To route the output in this way, you stop a running emulator/device > > > > > instance and then use the shell command setprop to enable the > > > > > redirection of output. Here's how you do it: > > > > > > $ adb shell stop > > > > > $ adb shell setprop log.redirect-stdio true > > > > > $ adb shell start" > > > > > > thanks, > > > > > Anil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Why don't System.err and System.out point to the console?
Speaking of logging, is there a problem using Log4J with Android. I've redirected STDOUT/STDERR and I'm getting tons of these messages when running logcat: W/dalvikvm( 739): read stdout: (17,512) failed (0): Unknown error: 0 W/dalvikvm( 739): read stdout: (17,512) failed (0): Unknown error: 0 Are you guys having the same issue? Thanks, Kobi. On Apr 5, 12:50 pm, "Dan U." <[EMAIL PROTECTED]> wrote: > I also would have preferred for the normal use of System.out and > System.err, but the Android way does force developers to use a more > proper logging api which is not necessarily a bad thing. > > On Apr 5, 8:20 am, Anil <[EMAIL PROTECTED]> wrote: > > > I don't think you understood my suggestion. Even if it is Dalvik, it > > can behave in a standard manner that a generation of Java programmers > > expects. After all, we are using Java 1.5. There is a further benefit > > in production as listed above. > > > On Apr 4, 11:56 pm, Andrex <[EMAIL PROTECTED]> wrote: > > > > It's because the Android code isn't really Java, it's Dalvik, and the > > > Android emultator makes you report those things to the Dalvik output. > > > You yourself listed the process to print errors there, I suggest you > > > use it. ;) > > > > On Apr 4, 7:34 pm, Anil <[EMAIL PROTECTED]> wrote: > > > > > It would be good for Android phones to have a rolling log file that > > > > doubles as a console. > > > > That way, when there are problems with applications in production, the > > > > user can simply push the logs to a server - just as Microsoft does > > > > now. > > > > It is weird for developers to not have familiar tools like > > > > e.printstacktrace() or System.out.println(). > > > > Instead we have something rather inconvenient to use: > > > > >http://code.google.com/android/reference/adb.html > > > > > "By default, the Android system sends stdout and stderr (System.out > > > > and System.err) output to /dev/null. In processes that run the Dalvik > > > > VM, you can have the system write a copy of the output to the log > > > > file. In this case, the system writes the messages to the log using > > > > the log tags stdout and stderr, both with priority I. > > > > > To route the output in this way, you stop a running emulator/device > > > > instance and then use the shell command setprop to enable the > > > > redirection of output. Here's how you do it: > > > > > $ adb shell stop > > > > $ adb shell setprop log.redirect-stdio true > > > > $ adb shell start" > > > > > thanks, > > > > Anil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Why don't System.err and System.out point to the console?
I also would have preferred for the normal use of System.out and System.err, but the Android way does force developers to use a more proper logging api which is not necessarily a bad thing. On Apr 5, 8:20 am, Anil <[EMAIL PROTECTED]> wrote: > I don't think you understood my suggestion. Even if it is Dalvik, it > can behave in a standard manner that a generation of Java programmers > expects. After all, we are using Java 1.5. There is a further benefit > in production as listed above. > > On Apr 4, 11:56 pm, Andrex <[EMAIL PROTECTED]> wrote: > > > It's because the Android code isn't really Java, it's Dalvik, and the > > Android emultator makes you report those things to the Dalvik output. > > You yourself listed the process to print errors there, I suggest you > > use it. ;) > > > On Apr 4, 7:34 pm, Anil <[EMAIL PROTECTED]> wrote: > > > > It would be good for Android phones to have a rolling log file that > > > doubles as a console. > > > That way, when there are problems with applications in production, the > > > user can simply push the logs to a server - just as Microsoft does > > > now. > > > It is weird for developers to not have familiar tools like > > > e.printstacktrace() or System.out.println(). > > > Instead we have something rather inconvenient to use: > > > >http://code.google.com/android/reference/adb.html > > > > "By default, the Android system sends stdout and stderr (System.out > > > and System.err) output to /dev/null. In processes that run the Dalvik > > > VM, you can have the system write a copy of the output to the log > > > file. In this case, the system writes the messages to the log using > > > the log tags stdout and stderr, both with priority I. > > > > To route the output in this way, you stop a running emulator/device > > > instance and then use the shell command setprop to enable the > > > redirection of output. Here's how you do it: > > > > $ adb shell stop > > > $ adb shell setprop log.redirect-stdio true > > > $ adb shell start" > > > > thanks, > > > Anil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Why don't System.err and System.out point to the console?
I don't think you understood my suggestion. Even if it is Dalvik, it can behave in a standard manner that a generation of Java programmers expects. After all, we are using Java 1.5. There is a further benefit in production as listed above. On Apr 4, 11:56 pm, Andrex <[EMAIL PROTECTED]> wrote: > It's because the Android code isn't really Java, it's Dalvik, and the > Android emultator makes you report those things to the Dalvik output. > You yourself listed the process to print errors there, I suggest you > use it. ;) > > On Apr 4, 7:34 pm, Anil <[EMAIL PROTECTED]> wrote: > > > It would be good for Android phones to have a rolling log file that > > doubles as a console. > > That way, when there are problems with applications in production, the > > user can simply push the logs to a server - just as Microsoft does > > now. > > It is weird for developers to not have familiar tools like > > e.printstacktrace() or System.out.println(). > > Instead we have something rather inconvenient to use: > > >http://code.google.com/android/reference/adb.html > > > "By default, the Android system sends stdout and stderr (System.out > > and System.err) output to /dev/null. In processes that run the Dalvik > > VM, you can have the system write a copy of the output to the log > > file. In this case, the system writes the messages to the log using > > the log tags stdout and stderr, both with priority I. > > > To route the output in this way, you stop a running emulator/device > > instance and then use the shell command setprop to enable the > > redirection of output. Here's how you do it: > > > $ adb shell stop > > $ adb shell setprop log.redirect-stdio true > > $ adb shell start" > > > thanks, > > Anil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Why don't System.err and System.out point to the console?
It's because the Android code isn't really Java, it's Dalvik, and the Android emultator makes you report those things to the Dalvik output. You yourself listed the process to print errors there, I suggest you use it. ;) On Apr 4, 7:34 pm, Anil <[EMAIL PROTECTED]> wrote: > It would be good for Android phones to have a rolling log file that > doubles as a console. > That way, when there are problems with applications in production, the > user can simply push the logs to a server - just as Microsoft does > now. > It is weird for developers to not have familiar tools like > e.printstacktrace() or System.out.println(). > Instead we have something rather inconvenient to use: > > http://code.google.com/android/reference/adb.html > > "By default, the Android system sends stdout and stderr (System.out > and System.err) output to /dev/null. In processes that run the Dalvik > VM, you can have the system write a copy of the output to the log > file. In this case, the system writes the messages to the log using > the log tags stdout and stderr, both with priority I. > > To route the output in this way, you stop a running emulator/device > instance and then use the shell command setprop to enable the > redirection of output. Here's how you do it: > > $ adb shell stop > $ adb shell setprop log.redirect-stdio true > $ adb shell start" > > thanks, > Anil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---