sergey-su / logjoint

LogJoint log viewer core. Viewer plugins for publicly-available domains.
MIT License
55 stars 13 forks source link

Threads loading #15

Closed rkapl123 closed 3 years ago

rkapl123 commented 3 years ago

Dear Sergey!

After having now multiple log-files set up (see #14 ), I've observed that the high-level Threads overview is only loaded completely (first line - which is extremely helpful when identifying threads, but also the links to the first and last line of the respective log) when scrolling through the details pane below.

I understand that "on the fly" loading/refreshing this information is probably quite resource intensive, but is it somehow possible to have a way to reload this information by hand (and wait a bit..)? This would be easier than scrolling (slowly!) through millions of log lines...

-regards, Roland

rkapl123 commented 3 years ago

Dear Sergey! I'd also like to build logjoint myself, however I'm stuck with Visual Studio Community thinking this is a .NET Framework project, where it's actually a .NET Standard one. I presume you are using some other IDE, but do you have any ideas, how to build logjoint? Probably with a different Visual Studio? -regards, Roland

sergey-su commented 3 years ago

It's true that finding all threads "on the fly" won't work in general because the logs can be arbitrarily large, and logjoint by-design does a constant amount work to open a log (i.e. it reads constant amount of data). Currently there is no way to start a long operation, wait, and have all threads discovered. I need to think a bit how make it possible.

sergey-su commented 3 years ago

To build locally on windows, open solution trunk\platforms\windows\logjoint.sln, select logjoint as a startup project and press Run. I use VS2017 full edition. No fancy features are used missing from community edition. VS2017 community should work. However I did not try.

sergey-su commented 3 years ago

Pushed an update. Try right-click menu on any thread: image

rkapl123 commented 3 years ago

Thats very nice now! Thanks a lot! I'm still trying to build LogJoint on VS2019, I'm letting you know (maybe with a PR) when I made it!

-regards, Roland

rkapl123 commented 3 years ago

Hi Sergey!

I think, I've found the problem with building: I'm on VS2019 (16.9.4) and the required .NET SDK needs to be 2.2.110 (at least thats what most error messages tell me for global.json).

However, according to https://dotnet.microsoft.com/download/dotnet/2.2 this is only possible to install for VS 2017, the next possible .NET SDK for 2019 would be 2.2.207

Besides, this SDK is not supported anymore by Microsoft, so maybe switching to 2.1, 3.1 or 5.0 would be advisable?

regards, Roland

sergey-su commented 3 years ago

Switched to 5.0. Tested on VS2019 16.10.0 Preview 2.1.

rkapl123 commented 3 years ago

OK, after modifying the references in trunk\platforms\windows\logjoint.test.logging.app\logjoint.test.logging.app.csproj from

    <Reference Include="log4net">
      <HintPath>..\..\..\model\tests\log4net\2.0\log4net.dll</HintPath>
    </Reference>
    <Reference Include="NLog">
      <HintPath>..\..\..\model\tests\nlog\4.4\NLog.dll</HintPath>
    </Reference>

to

    <Reference Include="log4net">
      <HintPath>..\..\..\tests\model\log4net\2.0\log4net.dll</HintPath>
    </Reference>
    <Reference Include="NLog">
      <HintPath>..\..\..\tests\model\nlog\4.6\NLog.dll</HintPath>
    </Reference>

I managed to build the logjoint project alone, except the following postbuild event fails:

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(5534,5): error MSB3073: The command "copy C:\dev\logjoint\trunk\platforms\windows\packages\Google.OrTools.runtime.win-x64.7.3.7083\runtimes\win-x64\native\Google.OrTools.runtime.win-x64.dll C:\dev\logjoint\trunk\platforms\windows\bin\release\" exited with code 1.

which is a result that the Google.OrTools are not available (they are not installed by nuget in the expected place ?). I do not know whether this is needed to run logjoint, the app ran without problems in a quick test...

There is also a compilation error in the logjoint.model.tests project: 1>C:\dev\logjoint\trunk\tests\model\RollingFilesMediaTest.cs(353,9,353,36): error CS7036: There is no argument given that corresponds to the required formal parameter 'searchPatterns' of 'GenericRollingMediaStrategy.GenericRollingMediaStrategy(string, IEnumerable)'

-regards, Roland

sergey-su commented 3 years ago

Thanks for pointing out. Fixed all 3 issues. Tested on clean checkout in VS2019 16.10.0 Preview 2.1.

rkapl123 commented 3 years ago

Thank you for updating, almost everything built fine, there was just one error left: 21>C:\dev\logjoint\trunk\extensions\sysinternals\platforms\windows\logjoint.sysinternals.plugin\Plugin.cs(5,17,5,29): error CS0246: The type or namespace name 'IApplication' could not be found (are you missing a using directive or an assembly reference?)

After readding the broken reference to logjoint.sdk (which removed a "private"=false element) and upgrading the two projects logjoint.sysinternals.plugin and logjoint.sysinternals.plugin.model to .NET 4.6.1 (same as the main project) this was gone as well.

sergey-su commented 3 years ago

Pushed the fix for logjoint.sysinternals.plugin. logjoint.sysinternals.plugin as well as other plugins are optional. Don't bother building them during local development.

rkapl123 commented 3 years ago

Great, I could build the main project and all the tests fine now. Thanks a lot!