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

logfile enhancement #831

Open
honggyukim opened this issue Jul 10, 2019 · 9 comments · May be fixed by #1971
Open

logfile enhancement #831

honggyukim opened this issue Jul 10, 2019 · 9 comments · May be fixed by #1971

Comments

@honggyukim
Copy link
Collaborator

honggyukim commented Jul 10, 2019

I would like to create the logfile inside uftrace.data directory by default so that external users can send it us simply with a single directory. And the name doesn't have to be different all the time.

The current implementation requires explicitly remove the previous logfile because its open mode is append, but we don't have to remove it anymore if it's created inside uftrace.data.
The previous discussion is in #707.

In addition, I think we don't have to provide logfile name explicitly. Why don't we just fix the logfile name as uftrace.data/logfile.txt? It will look a lot simpler.

@namhyung
Copy link
Owner

namhyung commented Sep 9, 2019

OK, I agree with you that having the log file in the data directory (with a fixed name) is good. But the problem is that we need to consider backward compatibility of the option because it used to have an argument for the file name. Maybe it'd be nice to use the given name in the data directory.

@honggyukim
Copy link
Collaborator Author

I'm okay with it. We should also think how to handle the case when -H option is used.

@junhoryu
Copy link
Contributor

I'd like to take it

@honggyukim
Copy link
Collaborator Author

@junhoryu Thanks! Please take it and let me know if you have any problems.

@honggyukim
Copy link
Collaborator Author

@junhoryu Do you still have a plan to work on this?

@MichelleJin12
Copy link
Contributor

How to use --logfile option

uftrace record --logfile="filename" -v[vv] "executable file"
-v, -vv, and -vvv are debug levels.
related: https://github.com/namhyung/uftrace/wiki/Debug-message-guidelines

How to use --host option

In host, uftrace recv
In the machine for tracing, uftrace record --logfile="filename" -v --host="IP addr" "executable file"

Currently, the --logfile option stores a logfile in the uftrace execution location.
The --host option + --logfile option stores the logfile in the uftrace execution location, and the host receives it in uftrace.data.

TODO

@hjongkim
Copy link
Contributor

I will take it.

@hjongkim
Copy link
Contributor

hjongkim commented Jul 23, 2023

c829de3

-H option is changed. Backwards compatibility for --host option needs to be considered.

dlgus8648 added a commit to dlgus8648/uftrace that referenced this issue Sep 12, 2024
uftrace: Improve logfile creation location

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 clinet, the logfile in the uftrace.data
directory is sent to the host.

Fixed: namhyung#831
@dlgus8648 dlgus8648 linked a pull request Sep 12, 2024 that will close this issue
@dlgus8648
Copy link

Hello @namhyung @honggyukim

I am a mentee participating in the uftrace open-source project in OSSCA.

I have attempted to resolve the issue#831 regarding the logfile enhancement.

Before:

Currently, the --logfile option stores the logfile in the uftrace execution directory.

The --host option + --logfile option stores the logfile in the uftrace execution directory, and the host receives it in the uftrace.data directory.

After:

The logfile is now created inside the uftrace.data directory with the specified name.

When using the --host option with the --logfile option, the logfile is included and transferred to the specified directory on the host.

dlgus8648 added a commit to dlgus8648/uftrace that referenced this issue Sep 12, 2024
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]>
dlgus8648 added a commit to dlgus8648/uftrace that referenced this issue Sep 12, 2024
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]>
dlgus8648 added a commit to dlgus8648/uftrace that referenced this issue Oct 8, 2024
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants