*
* @param s
* the s
*/
public void appendToHtml(String s) {
Document doc = null;
try {
doc = Jsoup.parse(new File(getDefaultLogPath() + ".html"), "UTF-8");
} catch (IOException e) {
}
Element body = doc.select("body").first();
if (session == 0) {
session = System.currentTimeMillis();
body.appendElement("br");
Element sess = new Element(Tag.valueOf("div"), "", new Attributes());
sess.addClass("session");
sess.attr("id", String.valueOf(session));
sess.append("Session started on " + new java.util.Date());
body.appendChild(sess);
body.appendElement("br");
if (s.equals("")) {
saveLogFile(doc);
return;
}
}
Element cursession = doc.select("#" + session).first();
if (cursession == null)
return;
Element timestamp = new Element(Tag.valueOf("span"), "",
new Attributes());