Search code examples
loggingherokuio-redirectionreformatting

Reformat default heroku log then redirect to output file


how can I change the default formatting to files (stdin, stdout and stderr) in a Heroku log, and then redirect to output file- logs.txt?


Solution

  • Figured this out using a command from I/O redirect: Used this example and tailored it to what I needed to do: COMMAND_OUTPUT > # Redirect stdout to a file. # Creates the file if not present, otherwise overwrites it.

    I wanted to output my heroku log to a file called logs.txt - heroku logs > logs.text

    This worked and I found the file - logs.txt in my sublime directory