Added getLogLevels() and setLogLevels() functions for controlling
logging at runtime. They're available to javascript via getLogLevels()
and setLogLevels().