CobaltFusion/DebugViewPP

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

plhak-marek opened this issue · 2 comments

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
{
}

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 ?

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.