I'd like to get some kind of logging working, to help with debugging.
I've tried:
System.out.println()
java.util.logging.Logger.severe()
android.util.Log.w()
I've looked in the console, and the LogCat view, and I can't find any
output.
> I'd like to get some kind of logging working, to help with debugging.
> I've tried:
> System.out.println()
> java.util.logging.Logger.severe()
> android.util.Log.w()
> I've looked in the console, and the LogCat view, and I can't find any
> output.
> Maybe you have set the filter to other than 'Warnings'?
> On Dec 3, 11:23 pm, Ian <heads...@gmail.com> wrote:
> > Hi,
> > I'd like to get some kind of logging working, to help with debugging.
> > I've tried:
> > System.out.println()
> > java.util.logging.Logger.severe()
> > android.util.Log.w()
> > I've looked in the console, and the LogCat view, and I can't find any
> > output.
> I'd like to get some kind of logging working, to help with debugging. > I've tried: > System.out.println() > java.util.logging.Logger.severe() > android.util.Log.w()
> I've looked in the console, and the LogCat view, and I can't find any > output.
The trick is that you should never exit the emulator.
To get it working, exit eclipse and the emulator... under windows,
kill the 'adb' process.
Now relaunch Eclipse, run your program.
You should see your logging (obviously, you must open the Logcat
window, the Console window isn't where the logs come out).
Now, when you are done with your test run, or want to start over, just
run (or debug) your application again. It will show up very quickly
in the emulator (this is like Christmas for Programmers!) and logging
& debugging will work again and again.
Hope this helps.
Jim
On Dec 3, 3:09 pm, Ian <heads...@gmail.com> wrote:
> No, I've tried various filter settings in LogCat.
> Is there any special thing you have to do to enable logging? Is the
> tag value special, or just a string? Any chance of a sample code
> snippet?
> Cheers,
> Ian
> On Dec 3, 2:34 pm, oxonom <phyrum....@sign.ch> wrote:
> > Log is working over here.
> > Maybe you have set the filter to other than 'Warnings'?
> > On Dec 3, 11:23 pm, Ian <heads...@gmail.com> wrote:
> > > Hi,
> > > I'd like to get some kind of logging working, to help with debugging.
> > > I've tried:
> > > System.out.println()
> > > java.util.logging.Logger.severe()
> > > android.util.Log.w()
> > > I've looked in the console, and the LogCat view, and I can't find any
> > > output.
> I'd like to get some kind of logging working, to help with debugging.
> I've tried:
> System.out.println()
> java.util.logging.Logger.severe()
> android.util.Log.w()
> I've looked in the console, and the LogCat view, and I can't find any
> output.
I use the Dalvik Debug Monitor to see log entries. In the Windows
version, under the SDK directory you should have a tools directory.
Run "ddms.bat". It will start a DOS-style console window, and another
with the DDM GUI.
Often it seems to lose the link with the emulator and/or application.
Closing and restarting the DDM makes it work again. Sometimes "adb
kill-server" is enough, but not always.
in a terminal window to see all the good things adb will do. One is
'adb logcat' which will print all the log messages. Use adb kill-
server to stop the server rather than just killing it. If you get a
message about eclipse connecting to a instance that it doesn't know
the capabilities of you should stop the emulator, run 'adb kill-
server' and restart eclipse. Then run your app again in eclipse to
allow it to start a new emulator.
As a data point, I'm working on an intel based Mac and most things
work well. (Although I'm seeing some weirdness in the zip library and
SQLite finalizers.)
On Dec 3, 5:23 pm, Ian <heads...@gmail.com> wrote:
> I'd like to get some kind of logging working, to help with debugging.
> I've tried:
> System.out.println()
> java.util.logging.Logger.severe()
> android.util.Log.w()
> I've looked in the console, and the LogCat view, and I can't find any
> output.
On Dec 3, 3:19 pm, Zach Hobbs <ho...@helloandroid.com> wrote:
> Sometimes I have to restart eclipse to get LogCat to work...
Thanks Zach, that worked for me. It looks like I have to close/
restart Eclipse, *then* open LogCat, *then* run my app. (I previously
didn't have LogCat open at startup.)
> On Dec 3, 3:19 pm, Zach Hobbs <ho...@helloandroid.com> wrote:
> > Sometimes I have to restart eclipse to get LogCat to work...
> Thanks Zach, that worked for me. It looks like I have to close/
> restart Eclipse, *then* open LogCat, *then* run my app. (I previously
> didn't have LogCat open at startup.)