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

fix: Certain Profiler log messages did not print correctly when running under Linux. (#2200) #2209

Merged
merged 2 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Agent/NewRelic/Home/Home.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</Target>

<ItemGroup>
<PackageReference Include="NewRelic.Agent.Internal.Profiler" Version="10.20.1.27"/>
<PackageReference Include="NewRelic.Agent.Internal.Profiler" Version="10.20.2.9"/>
</ItemGroup>

</Project>
10 changes: 5 additions & 5 deletions src/Agent/NewRelic/Profiler/Profiler/CorProfilerCallbackImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ namespace NewRelic { namespace Profiler {
HRESULT corProfilerInfoInitResult = pICorProfilerInfoUnk->QueryInterface(__uuidof(ICorProfilerInfo4), (void**)&_corProfilerInfo4);
if (FAILED(corProfilerInfoInitResult)) {
// Since MinimumDotnetVersionCheck already queried for minimum required interface, this check is just for safety
LogError(_X("Error initializing CLR profiler info: "), corProfilerInfoInitResult);
LogError(L"Error initializing CLR profiler info: ", corProfilerInfoInitResult);
return CORPROF_E_PROFILER_CANCEL_ACTIVATION;
}

Expand All @@ -199,12 +199,12 @@ namespace NewRelic { namespace Profiler {
&runtimeInfo->runtimeType, &runtimeInfo->majorVersion, &runtimeInfo->minorVersion, nullptr, nullptr, 0, nullptr, nullptr);

if (FAILED(runtimeInfoResult)) {
LogError(_X("Error retrieving runtime information: "), runtimeInfoResult);
LogError(L"Error retrieving runtime information: ", runtimeInfoResult);
return CORPROF_E_PROFILER_CANCEL_ACTIVATION;
}

if (!SetClrType(runtimeInfo)) {
LogError(_X("Unknown Runtime Type found: "), runtimeInfo->runtimeType);
LogError(L"Unknown Runtime Type found: ", runtimeInfo->runtimeType);
return CORPROF_E_PROFILER_CANCEL_ACTIVATION;
}

Expand Down Expand Up @@ -411,7 +411,7 @@ namespace NewRelic { namespace Profiler {
CComPtr<ICorProfilerInfo8> temp;
HRESULT result = pICorProfilerInfoUnk->QueryInterface(__uuidof(ICorProfilerInfo11), (void**)&temp);
if (FAILED(result)) {
LogError(_X(".NET Core 3.1 or greater required. Profiler not attaching."));
LogError(L".NET Core 3.1 or greater required. Profiler not attaching.");
return CORPROF_E_PROFILER_CANCEL_ACTIVATION;
}
return S_OK;
Expand All @@ -421,7 +421,7 @@ namespace NewRelic { namespace Profiler {
CComPtr<ICorProfilerInfo4> temp;
HRESULT interfaceCheckResult = pICorProfilerInfoUnk->QueryInterface(__uuidof(ICorProfilerInfo7), (void**)&temp);
if (FAILED(interfaceCheckResult)) {
LogError(_X(".NET Framework 4.6.1 is required. Detaching New Relic profiler."));
LogError(L".NET Framework 4.6.1 is required. Detaching New Relic profiler.");
return CORPROF_E_PROFILER_CANCEL_ACTIVATION;
}

Expand Down
Loading