-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
CLI Option to save logs to a file #9850
Comments
I'm interested! |
I'm also interested in always writing to a log file in a temporary directory unless it's disabled? Like |
@zanieb I am interested in working on this, here is the initial idea/ requirements I have when thinking about this:
Let me know if you have other requirements or considerations in mind |
Hi! I think this makes sense, though I have a few comments:
Just remember this also needs an equivalent on macOS and Windows. Is there an XDG specification?
I don't love the idea of in-project logs, unless we have a dedicated
I think trace-level logs may be too much? I'm not sure though. We may need to adjust this based on the practical experience. We should probably allow configuration of levels, e.g., via
Should we write to a single file? Or a file per command invocation? I lean towards the latter. @konstin and @BurntSushi may have opinions about the best way to do this. |
I think for me, it kinda depends on how folks want to use this. The initial proposal is really simple: the user provides a path to a file, and But if we get into log file rotation, separating logs by command invocation, separate ways for setting the log level (how would that interact with So I guess for me, I start with, in what cases do users want to use something other than |
My motivation is to not need to enable logging and re-run a command to see failures. I want to be able to say "See for more logs" on failure — sort of in the vein of #8351. |
That's also my use case, i.e. directing users to a detailed log file in case installation fails for any reason. |
@zanieb I have been working on this issue and on the requirements I am unsure about is when using file logs when running snapshot tests do you think it is so that we break the current snapshot tests that end in failure by adding a "See for more logs" to the snapshot or omit doing that when running snapshots
|
It's fine to add content to the existing snapshots. cc @Gankra for general awareness about output changes |
In short, similar to the
--log
option of pip:Related:
UV_LOG_FILE
is mentioned in Show tracing output on test failure #8351 so maybe Astral folks have considered thisThe text was updated successfully, but these errors were encountered: