def __init__(self, colored, formatter_chain=None):
self.colored = colored<EOL>self.formatter_chain = formatter_chain or []<EOL>self.formatter_chain.append(LogsFormatter._pretty_print_event)<EOL>
``formatter_chain`` is a list of methods that can format an event. Each method must take an
``samcli.lib.logs.event.LogEvent`` object as input and return the same object back. This allows us to easily
chain formatter methods one after another. This class will apply all the formatters from this list on each
log event.

After running the formatter chain, this class will convert the event object to string by appending
the timestamp to message. To skip all custom formatting and simply convert event to string, you can leave
the ``formatter_chain`` list empty.

Formatter Method
================
Formatter method needs to accept two arguments at a minimum: ``event`` and ``colored``. It can make
modifications to the contents of ``event`` and must return the same object.

Example:
.. code-block:: python

    def my_formatter(event, colored):
        \"""
        Example of a custom log formatter

        Parameters
        ----------
        event : samcli.lib.logs.event.LogEvent
            Log event to format

        colored : samcli.lib.utils.colors.Colored
            Instance of ``Colored`` object to add colors to the message

        Returns
        -------
        samcli.lib.logs.event.LogEvent
            Object representing the log event that has been formatted. It could be the same event object passed
            via input.
        \"""

        # Do your formatting

        return event

Parameters
----------
colored : samcli.lib.utils.colors.Colored
    Used to add color to the string when pretty printing. Colors are useful only when pretty printing on a
    Terminal. To turn off coloring, set the appropriate property when instantiating the
    ``samcli.lib.utils.colors.Colored`` class.

formatter_chain : list of formatter methods