<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_file(output_file, encoder=EliotJSONEncoder):
 """ Add a destination that writes a JSON message per line to the given file. @param output_file: A file-like object. """

    Logger._destinations.add(
        FileDestination(file=output_file, encoder=encoder)
    )