Add switching function of the log.