Instead of ternary operations, maybe make the log_level string determine the variable here. Show options in attribute file.