Skip to content
This repository was archived by the owner on Jul 25, 2024. It is now read-only.

write flag value to log file #1

Closed
wants to merge 2 commits into from

Conversation

sinofseven
Copy link

Thank you for creating this tool.

When I use it, I wanted to read the captured flag values in a text file so I could write them out to a log file.
(I want to be able to copy and paste when collecting configuration values for autosplit.)

@FrankvdStam
Copy link
Owner

Hi, your PR is much appreciated, thanks for taking the time.
Copy-pasting should be available, but I want to add many more usability features, like right-clicking a flag and then being able to add it to exclusions or watches directly, without having to copy it around. Building a nice GUI with ImGui is possible but its a challenge.

Have a look at this branch #2
I want to serve all state changes of the flags over a local webserver. The flags will then be accessible from soulsplitter (FrankvdStam/SoulSplitter#17). In WPF it is much easier to make a rich UI.

I don't know how long that's going to take to complete though...
So I'm willing to compromise and setup a temp solution that allows at least copying of flags. But I would prefer to not use info!() for that - the logfile should be technical/debug info only. If you log all flags, the logfile will get very polluted with this and grow quite big in size. Perhaps instead of that, we can fix it in the UI, here: https://github.com/FrankvdStam/soulmemory-rs/blob/04ea95204d439725971939b84f4b676fb8632b12/soulmemory-rs/src/gui/event_flag_widget.rs#L70C35-L70C35
Maybe ImGui has an option to copy text, or maybe we can display a button instead of text, and have the button copy the flag value to clipboard. Would that be a good temp solution until I build a WPF GUI for this?

@FrankvdStam
Copy link
Owner

Potential solution is to use a text input field instead, and set it to readonly ocornut/imgui#950 (comment)

@sinofseven
Copy link
Author

Thank you, your reply.

But I would prefer to not use info!() for that - the logfile should be technical/debug info only. If you log all flags, the logfile will get very polluted with this and grow quite big in size.

I agree with this idea. I had overlooked it.
When I actually moved it, I saw that it was quite large.

Since I don't want to collect flag values all the time, I will build and use code that outputs logs only when I want to collect them.

Sorry for the trouble.
Thank you very much.

@sinofseven sinofseven closed this Sep 11, 2023
@FrankvdStam
Copy link
Owner

@sinofseven its no trouble at all! Thank you for taking the time to create this PR!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants