Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Log file name unpredictable on keyboard interrupt #377
Because mothur creates its own name for the log file, and then only renames that log file to what the user specified with
It seems like it would be most easily solved by setting the name of the log file to the user specified name from the start. This would then also allow things like
Thanks for the suggestion!
Note: You can compile mothur with the default log file of "dev/null", and then set a run specific name for any runs you wish to have a log for.
Just to clarify, with this update will the
Mothur buffers the log, until the first command is processed. If the first command is set.logfile, then mothur creates a log file with the user specified name. (no renaming) If the first command is not set.logfile, then mothur will create a log file with the name specified at compile time(this could be dev/null or mothur.logfile). If no name is specified at compile time then a random name is generated.
I've been testing this as is implemented in the current
When built with the default
Side note specific to this error, when the logfile name is invalid, (such as when using
When using mothur built with
Thanks for the feedback. Here's the rework:
We are adding a compile time option to set a static log filename.
You can set the static log file name to "silent" to suppress the writing of the log file.
You can set a run specific log file name by running the set.logfile command as the first command in a batch or script.
With this new setup, I would recommend compiling with silent and setting a standard name for the logs you want to keep. For example you could capture the log for a specific command within mothur as follows.
mothur > set.logfile(name=silent) - surpress logging
Would result in a summary_Align.seqs logfile that contains:
mothur > set.logfile(name=summary_Align.seqs)
mothur > summary.seqs(fasta=current)
Using 4 processors.
Minimum: 1964 13425 259 0 3 1
of Seqs: 98
It took 0 secs to summarize 98 sequences.
Output File Names: