Naming Log Files for CAD Applications

An article about log file naming?  Well, somebody’s got to do it, because so few software tools get it right.

CAD software runs a long time in batch mode, so the log file is often the users’ sole feedback. When running a flow, I constantly check progress by listing the log files with the ls command. Repeatedly. All day. Their names and their sort order matter.

This is one of a series of articles on simple, specific techniques that will make your chip design flow easy to use. Other articles include,

The Default Log File Name

The default log file name should:

  • Begin with the name of the application
  • Contain a time stamp to make it unique so it does not overwrite previous log files
  • End with .log, the de facto file extension for EDA log files

For example,


where programName is the name of the application, preferably the name of the command used to start the application.  MM is the month of invocation, dd is the date, and so on. Include the leading zeros.  This way,

ls *.log

lists all log files grouped by application, and then in chronological order. The order breaks down a bit in early January (log files from last December appear after the newer January files), but adding the year would make the name unseasonably long.

The Journal File

You should also provide a journal file that records the exact sequence of commands executed during a session.  This enables “macro recording”, and allows anyone to reproduce the session.  Some tool architects weave the journal file and log file together into a single file by writing commands as-is while writing log messages as comments.

If you write a separate journal file, follow the log file naming rules, but use the standard file extension for your command language: .py, .tcl, etc.  For example,

Options to Change the Log File Name

When an automatic design flow runs your tool, it will need to name the log files to keep them organized. Therefore, your tool should provide command line options to:

  • Specify a literal log file name, like log/holdFix.log.
  • Replace just the application name with a specified string. This allows the user to specify a log file name while retaining the time stamp. For example, specifying log/holdFix would result in a log file name like log/holdFix.03_21_22_05.log.

With properly chosen log file names, the user can easily assess the progress of the flow with just ls. For example,

$ ls -lrt log/
log/netlistIn.log # Date and time omitted for brevity

It looks like the flow is working on notch and gap filling right now.

So there you have it. A mercifully short post about log file names. Now, back to those riveting error messages.

This article was originally published by John McGehee, Voom, Inc. under the CC BY 3.0 license.  Changes have been made.