public override void Flush() { base.Flush(); SetState(); try { CrestronLogger.ForceFlush(); } finally { RestoreState(); } }