-
Notifications
You must be signed in to change notification settings - Fork 474
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
uftrace: Improve logfile creation location #1971
base: master
Are you sure you want to change the base?
Conversation
Thanks for your contribution to fix this issue. However, we can see that the title part has a signature in it, and this line needs to be removed so that the original intended title can be uploaded. In addition, we can see that the title is |
Ensure that when using "--logfile=<name>", the logfile is created inside the uftrace.data directory. Additionally, when using both "--host" and "--logfile" options simultaneously on the client, the logfile in the uftrace.data directory is sent to the host. Fixed: namhyung#831 Signed-off-by: Rihyeon Kim <[email protected]>
It seems that the title recommended by gicheol is more appropriate. Thank you! |
@@ -1474,7 +1474,16 @@ int main(int argc, char *argv[]) | |||
debug = 1; | |||
|
|||
if (opts.logfile) { | |||
logfp = fopen(opts.logfile, "a"); | |||
char *logfile_path = NULL; | |||
if (create_directory(opts.dirname) < 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about this. Creating directory includes renaming the existing directory. This can be a problem either you create a new one for record or dealing with an existing one for replay.
Ensure that when using "--logfile=<name>", the logfile is created inside the uftrace.data directory. Additionally, when using both "--host" and "--logfile" options simultaneously on the client, the logfile in the uftrace.data directory is sent to the host. Fixed: namhyung#831 Signed-off-by: Rihyeon Kim <[email protected]>
I understood @namhyung 's comment to mean that calling the create_directory() function at that point could potentially cause issues elsewhere. |
uftrace: Improve logfile creation location
Ensure that when using "--logfile=", the logfile is created
inside the uftrace.data directory.
Additionally, when using both "--host" and "--logfile" options simultaneously
on the clinet, the logfile in the uftrace.data directory is sent to the host.
Fixed: #831