Logging if structure