Android File Logging
Android has LOG class by default.
This is for DDMS logging.
How about File?
Sample
private static void LOG( File file, String message ) { FileOutputStream fos = null; try { fos = new FileOutputStream(file, true); PrintWriter writer = new PrintWriter(new OutputStreamWriter(fos,"UTF-8")); writer.append(message); writer.close(); } catch ( Exception oops ) { oops.printStackTrace(); } finally { if ( fos != null ) IOUtils.closeQuietly(fos); } }
I use IOUtils(Apache Commons IO) for easy implementation.
File?
Where is file location?
You have multiple choices.
You need to learn file location about Android
Hi there, Ι еnjy reaԁіng through your аrtiсle post.
I like to write a little сomment to support you.