private static int writeLine(Writer w, String s) throws IOException {

    String logLine = StringConverter.unicodeToAscii(s).append(lineSep).toString();

    w.write(logLine);

    return logLine.length();
  }