-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
log view: set default log file by job outcome #1241
Comments
I'd like to see it implemented. Would the following chunck be the only one to change? I don't speak le Javascript but I can learn. Maybe. /**
* The preferred file to start with as a list of patterns.
* The first pattern with a matching file name will be chosen.
*/
const LOG_FILE_DEFAULTS = [
// job stdout
/^job\.out$/,
// job script (e.g. on job submission failure)
/^job$/,
// scheduler log (lexographical sorting ensures the latest log)
/^scheduler\/*/
]
/**
* Return the default log file from the given log filenames, if there is a
* matching filename. Relies on the filenames having been sorted in descending
* order.
*
* @param {string[]} logFiles - list of available log filenames
* @returns {?string}
*/
export const getDefaultFile = (logFiles) => {
if (logFiles.length) {
for (const filePattern of LOG_FILE_DEFAULTS) {
for (const fileName of logFiles) {
if (filePattern.exec(fileName)) {
return fileName
}
}
}
}
return null // rather than undefined
} It looks like in its current iteration, the log view only query files, but doesn't speak to the scheduler to find tasks' state. Would it be best to instead make the commandMenu send a
|
Whats the best way of getting the workflow status in the Its available in the
can a similar approach be used for the Log view? |
This works I think... ...also nice number pr to go into the new year |
Describe exactly what you would like to see in an upcoming release
The default log file selected should depend on the outcome of a job:
job.out
job.err
job-activity.log
Pull requests welcome!
The text was updated successfully, but these errors were encountered: