     ///
     public enum Option: Hashable {
 
+        /// Modify the any control characters found in the entry.
+        ///
         case controlCharacters(Action)
 
         public enum Action {
+
+            /// Strip the characters from the message.
+            ///
             case strip
+
+            /// Backslash escape the characters.
+            ///
             case escape
         }
     }

/// without configuration. Should refinement of the default behavior be required, these
/// options give you fine grain control over the output.
///
/// Terminators
/// ===========
///
/// Each log entry formatted by the formatter can be terminated with a character sequence.
/// The default value is a newline ("\n") and can be changed by passing the `terminator`
/// parameter at construction.
///
/// For instance.
///
///     let formatter = TextFormat(terminator: "\r\n")
///
/// In this case we changed the terminator from the default of "\n" to "\r\n".  The characters
/// can be any characters that make sense for your application. Keep in mind that for console or
/// file type output, a newline "\n" is required in order to write multiple lines to the screen
/// or file.
///
/// Control Characters
/// ============================
///
/// TraceLog allows you to embed formatting control characters (\r\n\t\)  into the message when logging messages. The TextFormat
/// allows you to strip those out or escape them so that the output can be more concise or machine readable if required.
///
/// Logging a statement like this is great for reading on the console but could cause issues with parsing
/// a format the requires analyzing the entries.
///
///     let formatter = TextFormat(options: [.controlCharacters(.strip)])
///
///     TraceLog.configure(writers: [ConsoleWriter(format: formatter)])
///
///     logInfo { "\n\t\tThis is a message with control characters that spans multiple lines \n\t\tand is indented with several tab characters." }
///
/// Using `stripControlCharacters: true` will allow you to strip those out before output, giving
/// you the following output in the console or file.
///
///     1970-01-01 00:00:00.000 ExampleProcess[100:1100] INFO: <ExampleTag> This is a message with control characters that spans multiple lines and is indented with several tab characters.
///
/// With stripControlCharacters: false` the output would look like this.
///
///     1970-01-01 00:00:00.000 ExampleProcess[100:1100] INFO: <ExampleTag>
///             This is a message with control characters that spans multiple lines
///             and is indented with several tab characters.
///
///
/// > Note: using `stripControlCharacters` does not affect the `terminator` output, terminators will still be printed.
///
/// Character Encoding
/// ==================
///
/// The default character encoding of the output is `urf8` which should be suitable
/// for most applications.
///
/// If required, this encoding can be changed by passing a `String.Encoding` value at init
/// to change the output encoding.
///
/// For instance.
///
///     let utf16 = TextFormat(encoding: .utf16)
///
///     let ascii = TextFormat(encoding: .ascii)
///
///     let isoLatin1 = TextFormat(encoding: .isoLatin1)
///
/// > Note: Any one of the encoding defined by `String.Encoding` can be used but if you're logging
/// characters outside the range that the encoding can encode, encoding will fail.
///
/// Output Templates
/// ================
///

        }
        text.write(self.terminator)

        /// Since we want to make sure messages are printed, we allow
        /// lossy conversion so that even if an invalid encoding can
        /// still be printed minus the un-encodable characters.
        ///
        guard let data = text.data(using: self.encoding, allowLossyConversion: true)
            else { return nil }

        return Array(data)
