Skip to content
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

Can't use string templates such as %(name)s in the DIR part of --logfile-format #2815

Closed
casparvl opened this issue Mar 19, 2019 · 4 comments
Milestone

Comments

@casparvl
Copy link
Contributor

casparvl commented Mar 19, 2019

If I use e.g.

--logfile-format="easybuild-%(name)s,%(name)s-%(version)s-%(date)s.%(time)s.ebout.log"

However, the %(name)s in the directory-part is not replaced. So, I get folders that are actually called 'easybuild-%(name)s'.

The documentation claims that these string templates should be usable for both the filename and directory:

The logfile format configuration setting contains a tuple specifying a log directory name and a template log file name. In both of these values, using the following string templates is supported:

See: https://easybuild.readthedocs.io/en/latest/Configuration.html#logfile-format

@ocaisa
Copy link
Member

ocaisa commented Mar 20, 2019

I took a look at the source and while the docs state that it is supported, it actually is not. It would require significant changes near https://github.com/easybuilders/easybuild-framework/blob/develop/easybuild/tools/config.py#L590 to make it look more like https://github.com/easybuilders/easybuild-framework/blob/develop/easybuild/tools/config.py#L609
as well as other changes in the source.

@boegel What do you think? The easy option is to change the docs to reflect the source.

@casparvl Is this a really important feature to you? It looks like bit of work...

@boegel
Copy link
Member

boegel commented Mar 22, 2019

It wasn't trivial to fix, but not that bad either, see #2818

@boegel boegel modified the milestones: 3.x, next release (3.8.2) Mar 22, 2019
@boegel
Copy link
Member

boegel commented Mar 22, 2019

Fixed with #2818, thanks for reporting this @casparvl!

@boegel boegel closed this as completed Mar 22, 2019
@casparvl
Copy link
Contributor Author

Wow, that wasn't as small a change as I would have expected it to be. Nice job on the fix, thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants