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

CustomErrorRegularExpression errors are displayed poorly #840

Open
vikukush opened this issue Dec 6, 2024 · 4 comments
Open

CustomErrorRegularExpression errors are displayed poorly #840

vikukush opened this issue Dec 6, 2024 · 4 comments

Comments

@vikukush
Copy link
Contributor

vikukush commented Dec 6, 2024

When CustomErrorRegularExpression of Exec task triggers over a bunch of log emitted to stdout, binlog viewer "plucks" the error messages out of the stdout into a separate item:

image

This makes it impossible to find where exactly the error happened in the stdout.
Meanwhile, normal log has the error messages displayed in correct order, allowing me to find where during execution the error actually happened, so I can see that it was between the NumberSequenceModuleSetup invocations:

12/06/2024 11:35:39: 12/06/2024 11:35:39: SysSetupInstaller: Running Script: NumberSequenceModuleSetup with Timeout 300 seconds.
D:\dbs\Cx\l23t\blah\SyncEngine.proj(153,5): error : 12/06/2024 11:35:39: RunError: Infolog [D:\dbs\sh\l23t\1206_105016\cmd\m\AxPackage\DBSyncPlatformCN\dbsyncplatformCN.proj::TargetFramework=net48]
D:\dbs\Cx\l23t\blah\SyncEngine.proj(153,5): error : 12/06/2024 11:35:39: RunError: Infolog [D:\dbs\sh\l23t\1206_105016\cmd\m\AxPackage\DBSyncPlatformCN\dbsyncplatformCN.proj::TargetFramework=net48]
12/06/2024 11:35:39: 12/06/2024 11:35:39: SysSetupInstaller: Script: NumberSequenceModuleSetup, Completed Successfully. Time elapsed: 0:00:00:00.0404475

Binlog viewer should handle this situation better. Probably by keeping the detected warning/error format strings in the full Messages dropdown.

@KirillOsenkov
Copy link
Owner

Is there a simple .proj file that I could build myself to investigate this?

@vikukush
Copy link
Contributor Author

vikukush commented Dec 6, 2024

Something like this I guess:

<Project>
  <Target Name="Outputsomestuff">
     <Exec Command="( for /l %%x in (1, 1, 100) do ( echo line%%x ) ) &amp; echo myerror &amp; echo lineend" CustomErrorRegularExpression="myerror" />
  </Target>
</Project>

So in the output it's:

line1
...
line100
myerror
lineend

you can't tell where myerror actually is from binlog.

@KirillOsenkov
Copy link
Owner

@YuliiaKovalova @JanKrivanek this seems like a good bug if someone wants to try diving deeper into the viewer.

The problem is that we extract all messages into a separate folder, and we extract errors into a different folder. We probably need to also extract the errors interspersed with the messages so that they get the timestamp too.

This is happening here:

private void CollapseMessagesToSubfolder(Task task)

One problem that needs solving is it's super useful to have the errors in a separate folder. We could have them in two places, but that would result in duplication (and two results when searching for them).

Something to think about.

@KirillOsenkov
Copy link
Owner

Errors are being bucketed into another folder here:

var errors = parent.GetOrCreateNodeWithName<Folder>(Strings.Errors);

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

No branches or pull requests

2 participants