 
     @IBAction func comment(_ sender: AnyObject) {
         let comment = commentTextField.stringValue
+        logComment(comment)
 
         if comment.isEmpty {
             scrollView.scrollToBottom()

            commentHistory.append(comment)
            commentHistoryIndex = commentHistory.count
        }
    }

    @IBAction func speakButtonStateChanged(_ sender: Any) {

private extension NSButton {
    var isOn: Bool { self.state == .on }
}

private extension String {
    var hasControlCharacters: Bool {
        hasRegexp(pattern: "\\p{Cntrl}")
    }

    var stringByRemovingControlCharacters: String {
        stringByReplacingRegexp(pattern: "\\p{Cntrl}", with: "")
    }
}
// swiftlint:enable file_length
