The Log class:

API for sending log output.

Generally, use the Log.v() Log.d() Log.i() Log.w() and Log.e() methods.

The order in terms of verbosity, from least to most is ERROR, WARN, INFO, DEBUG, VERBOSE. Verbose should never be compiled into an application except during development. Debug logs are compiled in but stripped at runtime. Error, warning and info logs are always kept.

Outside of Android, System.out.println(String msg) is used.

Answer from nhaarman on Stack Overflow
Top answer
1 of 4
141

The Log class:

API for sending log output.

Generally, use the Log.v() Log.d() Log.i() Log.w() and Log.e() methods.

The order in terms of verbosity, from least to most is ERROR, WARN, INFO, DEBUG, VERBOSE. Verbose should never be compiled into an application except during development. Debug logs are compiled in but stripped at runtime. Error, warning and info logs are always kept.

Outside of Android, System.out.println(String msg) is used.

2 of 4
25

Use the Android logging utility.

http://developer.android.com/reference/android/util/Log.html

Log has a bunch of static methods for accessing the different log levels. The common thread is that they always accept at least a tag and a log message.

Tags are a way of filtering output in your log messages. You can use them to wade through the thousands of log messages you'll see and find the ones you're specifically looking for.

You use the Log functions in Android by accessing the Log.x objects (where the x method is the log level). For example:

CopyLog.d("MyTagGoesHere", "This is my log message at the debug level here");
Log.e("MyTagGoesHere", "This is my log message at the error level here");

I usually make it a point to make the tag my class name so I know where the log message was generated too. Saves a lot of time later on in the game.

You can see your log messages using the logcat tool for android:

Copyadb logcat

Or by opening the eclipse Logcat view by going to the menu bar

CopyWindow->Show View->Other then select the Android menu and the LogCat view
🌐
Oracle
docs.oracle.com › javase › 8 › docs › technotes › guides › deploy › console_trace_log.html
22 Java Console, Tracing, and Logging
April 21, 2026 - This topic describes the Java Console, a debugging aid that redirects any System.out and System.err to the console window. The console is available for applets running with Java Plug-in and applications running with Java Web Start.
Discussions

Console.log in Java extension? - Jazz Forum
When "developing" javascripts within RTC, I find the console.log method to be very handy. What is the best "printf" method of debugging I can use from within an extension? I have a working Operation Advisor, but am now adding functionality to it and a piece is not working properly and I'd rather just use prints than debugging with Jetty at this point. ... JAZZ DEVELOPER (1.4k●5●43●45) Dec 31 '13, 1:18 a.m. You can use below statements to get the Log instance ... More on jazz.net
🌐 jazz.net
January 2, 2014
Using java.util.logging to log on the console - Stack Overflow
the logger is used inside the class, may also be configurated by the class. the handler may be set globally. so you might have different handlers, for output to console and/or file. you definetly have different loggers, e.g. for each class. More on stackoverflow.com
🌐 stackoverflow.com
debugging - Console.log in a Java Back-end - Stack Overflow
I'm using Java with Spring Boot in IntelliJ Community edition. I usually use console.log() in the front-end to debug my code and see the value of a variable. Here in the back-end I try to do the ... More on stackoverflow.com
🌐 stackoverflow.com
How do I check java console log.? - Stack Overflow
I am running java application and because of some error it gets closed, I want to check the error in log. How can I reopen java console with that log or is there any other way to check the log of j... More on stackoverflow.com
🌐 stackoverflow.com
May 23, 2017
🌐
Delft Stack
delftstack.com › home › howto › java › console log in java
console.log in Java | Delft Stack
March 4, 2025 - The most straightforward way to log messages in Java is by using the System.out.println method. This method prints text to the console, making it easy to track the flow of your program and display variable values at different stages.
🌐
IBM
ibm.com › support › pages › enable-java-console-logging
Enable Java Console logging
After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.
🌐
Codecademy
codecademy.com › docs › java › output › .println()
Java | Output | .println() | Codecademy
November 5, 2022 - Prints its argument to the console followed by a new line.
🌐
Jazz Community Site
jazz.net › forum › questions › 137262 › consolelog-in-java-extension
Console.log in Java extension? - Jazz Forum
January 2, 2014 - I just start my normal server in debug mode. then connect from Eclipse to a Remote app. debug both client and server at the same time. only case where I can't do this is when I develop a jazz client side plugin, ten I need to start another eclipse locally in debug mode. just add one line to the server.startup.bat as the last JAVA_OPTS line set JAVA_OPTS=%JAVA_OPTS% -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=3388 then the remote app port is 3388 · Register or log in to post your answer.
🌐
Outcast
outcastprogramming.com › home › java › how to console log in java: a step-by-step guide
How to Console Log in Java: A Step-by-Step Guide - Outcast
May 8, 2023 - Console logging is a technique used in programming to print out messages to the console. It is a way of debugging your code and identifying where errors are occurring. When you console log in Java, you can print out messages to the console using the System.out.println method.
Find elsewhere
🌐
DigitalOcean
digitalocean.com › community › tutorials › logger-in-java-logging-example
Java Logger: Logging Examples with Log4j & SLF4J | DigitalOcean
August 3, 2022 - For example if logger level is set to INFO, logs will be generated for INFO, WARNING and SEVERE logging messages. We can add multiple handlers to a java logger and whenever we log any message, every handler will process it accordingly. There are two default handlers provided by Java Logging API. ConsoleHandler: This handler writes all the logging messages to console
🌐
Oracle
java.com › en › download › help › javaconsole.html
How do I enable and view the Java Console?
Select Show Console and click OK. NOTE: These instructions apply if you've chosen to place the Java icon in the system tray through the Java Control Panel (Advanced tab)
🌐
Sentry
blog.sentry.io › a-guide-to-logging-and-debugging-in-java
Logging & Debugging in Java - Guide | Sentry Blog
September 25, 2025 - Unsaved console logs disappear when the program stops, making it difficult to keep a history of what happened. They also don’t allow you to categorize messages by severity, which makes it hard to spot critical issues in the output. Basic logging in Java can be achieved using the built-in java.util.logging package.
🌐
Loggly
loggly.com › home › java logging basics
Java Logging Basics - The Ultimate Guide To Logging - Loggly
June 27, 2025 - Log4j supports multiple different configuration file formats, including XML, JSON, and YAML. When your Java application starts, Log4j searches for a log4j2.<format> file in the project directory. If it doesn't find one, it will default to console output.
🌐
Hitachi
itpfdoc.hitachi.co.jp › manuals › 3021 › 3021336100e › H3610046.HTM
3.5.2 Collecting a Java console log : Job Management Partner 1/Data Highway - Server User's Guide
Click the Advanced tab, and then select all the check boxes under Debugging. Click the OK button. Restart Internet Explorer (IE). Do the same operation as when the problem occurred. In the task tray, right-click the displayed Java icon. Click Open version Console.
🌐
Vogella
vogella.com › tutorials › Logging › article.html
Java Logging API - Tutorial
Log levels INFO and higher will be automatically written to the console. Each handler’s output can be configured with a formatter ... You can also build your own formatter. The following is an example of a formatter which will create HTML output. package com.vogella.logger; import java.text....
🌐
Ixiasoft
ixiasoft.com › documentation › IXIASOFT_CCMS › 5.1 › Administration_Guides › per1389986400062_7.html
Turn on the Java Console - Ixiasoft.com
This procedure describes how to turn on the Java Console and enable its debugging and logging options. ... Click the Advanced tab. Expand the Debugging section. ... Expand the Java console section. Select Show console. Click OK to close the dialog box. Make sure that all instances of your browser ...
🌐
javaspring
javaspring.net › blog › console-log-java
Mastering Console Logging in Java — javaspring.net
Add the necessary dependencies to your project. Create a logback.xml configuration file. Use SLF4J in your Java code. <!-- logback.xml --> <configuration> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> </encoder> </appender> <root level="debug"> <appender-ref ref="STDOUT" /> </root> </configuration>
🌐
SigNoz
signoz.io › guides › java logging: from println to production-ready logs
Master Java Logging: From System.out.println to ...
July 10, 2024 - This configuration tells Log4j2 WHERE to write logs (Console appender), HOW to format them (PatternLayout), and WHAT to log (info level and above).