Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android's version of C#'s Console.WriteLine?

Tags:

android

In Android, what is the best way to write to the console. In C# I'd use either Log4Net or just Console.Write

like image 851
Ian Vink Avatar asked Aug 09 '10 14:08

Ian Vink


People also ask

What is Android 11 called?

Android 11 (internally codenamed Red Velvet Cake) was intended for three monthly developer preview builds to be released before the first beta release, initially due in May, with a total of three monthly beta releases before the actual release.

What is Android 7 called?

Nougat, which has been in developer and early-adopter preview for the last few months since being announced at Google's I/O developer conference in May, will be the 14th distinct iteration of Android, labeled Android 7.0.

What is Android 13 called?

Android 13 (internally codenamed Tiramisu) was announced in an Android blog posted on February 10, 2022, and the first Developer Preview was immediately released for the Google Pixel series (from Pixel 4 to Pixel 6, dropping support for the Pixel 3 and Pixel 3a).


1 Answers

Check out the help pages for Android.Util.Log.

You can use:

Log.v("MyActivity", "Verbose output");
Log.d("MyActivity", "Debug output");
Log.e("MyActivity", "Error output");
Log.i("MyActivity", "Information output");
Log.w("MyActivity", "Warning output");
Log.wtf("MyActivity", "WTF output"); // This isn't a joke :)
like image 130
Mark Ingram Avatar answered Oct 22 '22 04:10

Mark Ingram