Added logging API with log levels.