Skip to content

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

Description

@plhak-marek

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

Activity

  1. janwilmans commented on Jun 28, 2023

    @janwilmans
    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 ?

  2. plhak-marek commented on Jun 30, 2023

    @plhak-marek
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions