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,
- Control Your IC Design Flow
- Write Effective Error Messages
- Give Files in Your IC Design Flow Useful Names
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
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,
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:
.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
- 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/holdFixwould result in a log file name like
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.