-
-
Notifications
You must be signed in to change notification settings - Fork 975
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 logfile support dynamic paths? #6184
Comments
Not sure if I really understand what you are trying to achieve here, actually. The options for logfile are part of the But you can change the {
"format" : "{asctime} {name}: {message}",
"format-date": "%H:%M:%S",
"path" : "~/log.txt",
"encoding" : "ascii"
} And you can access information about the currently used extractor with |
I hope that each time I download a different link, a separate log will be generated according to the corresponding link, rather than all of them being downloaded into one file |
Log files get initialized at the very start before any input URLs get processed. Having a dynamic log file path based on metadata values, which are not available when log files are initialized, would currently not make much sense. |
I don't know if saying this will help you or not but some of this is possible if you run gallery-dl through a different script. In my bash script I extract the usernames from website URLs like this:
And I build the gallery-dl command like this (where $1 is the input url):
Edit: I didn't mean to send this yet. I accidently pressed shift-enter. |
e.g.
"logfile": {"path": "./log/{user['name']}.log"}
"logfile": {"path": "./log/{search}.log"}
"logfile": {"path": "./log/{tag}.log"}
Download multiple author links/search links (tag/search) and write log with different file names through the configuration file according to the author or tag/search, instead of using the command -- write-log every time
The text was updated successfully, but these errors were encountered: