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

AnyFileReader::PrepareStep processName always overriden by filename as in BinaryFileReader #388

Open
plhak-marek opened this issue Jun 27, 2023 · 2 comments

Comments

@plhak-marek
Copy link

I would like to see name of original process when I load logs from file.

To present filename as now, we could move it into message header.

The proposed change:

void AnyFileReader::PreProcess(Line& line) const
{
    line.processName = Str(m_filenameOnly).str();
}

->

void AnyFileReader::PreProcess(Line& line) const
{
   line.message = "[" + Str(m_filenameOnly).str() + "] ";
}

In my opinion, the filename addition in line.message can be omitted. I already know the exact file I have loaded and do not want to see it in the log.

->

void AnyFileReader::PreProcess(Line& line) const
{
}
@janwilmans
Copy link
Member

the reason we overwrite the processname is that you can monitor multiple files once, and then you probably do want to know where the message came from.

But there is another thing going on, loading logs from debugview++ have a header and should behave different from tailing normal files.

Are you drag/dropping a debugview++ logfile in ?

@plhak-marek
Copy link
Author

Hi, thank you for informations.
As you have mentioned, in the log file I put the header with the version 1 formatting there as found in project source file and it has worked as expected.
But not as we would want, that means we havn't seen the processName but fileName.

One of the possible solution would be in our local copy, to analyse the log file and forward it's type based on our specific syntactic content and assign specific type which will propagate processName based on this. But it is not a common solution to deliver it for common purpose. Also it requires on our side to perform time-to-time rebase to project origin to be up to date.

Or simply propagate processName in message ;).

I'm for closing this issue if the behaviour is as expected for the format version 1.
Thank you.

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

No branches or pull requests

2 participants