.LOG files with TextEdit

Discussion in 'Mac Apps and Mac App Store' started by ddoonie, Jul 15, 2008.

  1. ddoonie macrumors regular

    Joined:
    Jun 4, 2008
    #1
    Does anyone know how to make log files with textedit? In windows, you can open a new document in notepad, type .LOG, save it, and everytime you reopen it, it will stamp a date/time. How can i do this with TextEdit?

    Thanks
     
  2. MBUSA macrumors newbie

    Joined:
    Apr 20, 2013
    Location:
    Plano, TX
  3. old-wiz macrumors G3

    Joined:
    Mar 26, 2008
    Location:
    West Suburban Boston Ma
    #3
  4. MBUSA macrumors newbie

    Joined:
    Apr 20, 2013
    Location:
    Plano, TX
    #4
    Yes, I have the same question (how to do this in OSX), and I was hoping that 5 years later, someone would have an answer. Thanks!
     
  5. pitaya macrumors member

    Joined:
    Jun 17, 2012
    #5
    I'm not a TextEdit expert, but I don't think it's possible. You could write a wrapper to append a timestamp and open the log file, but I don't believe TextEdit can do it by itself.

    You could make a quick app using Automator. Add a Run Shell Script action. Pass input: as arguments. In the text box put something like:

    Code:
    echo >> $1
    date >> $1
    open -t $1
    Pick an extension for your log files. I'd pick something less common than .log. Right click an example file, Get Info. Set the Open with: option to your automator app.
     

Share This Page