uftrace: Improve logfile creation location#1971
uftrace: Improve logfile creation location#1971dlgus8648 wants to merge 2 commits intonamhyung:masterfrom
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 <dlgus8648@naver.com>
|
It seems that the title recommended by gicheol is more appropriate. Thank you! |
| 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.
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 <dlgus8648@naver.com>
|
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