         log.addObserver(self)
     }
     
+    public override func viewDidAppear(_ animated: Bool) {
+        super.viewDidAppear(animated)
+        
+        viewer.scrollToBottom()
+    }
+    
     // MARK: - LogObserver
     public func log(entry: Log.Entry) {
         guard let data = entry.data, let string = String(data: data, encoding: .utf8) else {

        DispatchQueue.main.async {
            let output = String(format: "%@\n%@", self.viewer.text, string)
            self.viewer.text = output
            self.viewer.flashScrollIndicators()
        }
    }

    }
}

extension UITextView {
    func scrollToBottom() {
        let range = NSRange(location: text.lengthOfBytes(using: .utf8), length: 0)
        scrollRangeToVisible(range)
    }
}

#endif

#if canImport(MessageUI) && canImport(UIKit)
