/** * Write. * * @param level the level * @param tag the tag * @param msg the msg * @param error the error */ private static void write(string level, string tag, string msg, Throwable error) { if (!initialized) { init(); } if (logStream == null || logStream.CheckError()) { initialized = false; return; } Date now = new Date(); logStream.Printf(LOG_ENTRY_FORMAT, now, now, level, tag, TAG_LEFT_BRICK + TAG_RIGHT_BRICK + msg); logStream.Println(); if (error != null) { error.PrintStackTrace(logStream); logStream.Println(); } }