Wednesday, July 02, 2008

Mac Java logging

Continued with the java logging work, specially on the mac. Found the following:
  1. logging to console is not possible, since java intercepts all console ouput and writes it to the logg... Creates a loop that fills th console. I have not found any way to turn this off, please drop me a line if you find one..
  2. logging to file with the standard XMLFormatter (the default if you dont change the configuration) produces (almost) an xml file.
  3. The 'XML' file has encoding "MacRoman" , which I have never heard of, but it seems like it is almost standard. Safari (Apple's own browser) does not know it, and complains 'Unsupported encoding MacRoman'. Firefox does not complain about the encoding however.
  4. The 'XML' file has a root tag of <log>. There is no closing tag, so it's an invalid xml. If you want to open the file in Firefox you have to add </log> by hand.
  5. If you print xml strings to your log (which we do) the XMLFormatter tries to escape them, but does not succeed, so you might have to remove them.
Seems like there are a few bugs here....

No comments: