Skip to content

Commit 1b75bf9

Browse files
authored
fix: Certain Profiler log messages did not print correctly when running under Linux. (#2200) (#2209)
1 parent 4c146ce commit 1b75bf9

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Agent/NewRelic/Home/Home.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</Target>
1414

1515
<ItemGroup>
16-
<PackageReference Include="NewRelic.Agent.Internal.Profiler" Version="10.20.1.27"/>
16+
<PackageReference Include="NewRelic.Agent.Internal.Profiler" Version="10.20.2.9"/>
1717
</ItemGroup>
1818

1919
</Project>

src/Agent/NewRelic/Profiler/Profiler/CorProfilerCallbackImpl.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ namespace NewRelic { namespace Profiler {
189189
HRESULT corProfilerInfoInitResult = pICorProfilerInfoUnk->QueryInterface(__uuidof(ICorProfilerInfo4), (void**)&_corProfilerInfo4);
190190
if (FAILED(corProfilerInfoInitResult)) {
191191
// Since MinimumDotnetVersionCheck already queried for minimum required interface, this check is just for safety
192-
LogError(_X("Error initializing CLR profiler info: "), corProfilerInfoInitResult);
192+
LogError(L"Error initializing CLR profiler info: ", corProfilerInfoInitResult);
193193
return CORPROF_E_PROFILER_CANCEL_ACTIVATION;
194194
}
195195

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

201201
if (FAILED(runtimeInfoResult)) {
202-
LogError(_X("Error retrieving runtime information: "), runtimeInfoResult);
202+
LogError(L"Error retrieving runtime information: ", runtimeInfoResult);
203203
return CORPROF_E_PROFILER_CANCEL_ACTIVATION;
204204
}
205205

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

@@ -411,7 +411,7 @@ namespace NewRelic { namespace Profiler {
411411
CComPtr<ICorProfilerInfo8> temp;
412412
HRESULT result = pICorProfilerInfoUnk->QueryInterface(__uuidof(ICorProfilerInfo11), (void**)&temp);
413413
if (FAILED(result)) {
414-
LogError(_X(".NET Core 3.1 or greater required. Profiler not attaching."));
414+
LogError(L".NET Core 3.1 or greater required. Profiler not attaching.");
415415
return CORPROF_E_PROFILER_CANCEL_ACTIVATION;
416416
}
417417
return S_OK;
@@ -421,7 +421,7 @@ namespace NewRelic { namespace Profiler {
421421
CComPtr<ICorProfilerInfo4> temp;
422422
HRESULT interfaceCheckResult = pICorProfilerInfoUnk->QueryInterface(__uuidof(ICorProfilerInfo7), (void**)&temp);
423423
if (FAILED(interfaceCheckResult)) {
424-
LogError(_X(".NET Framework 4.6.1 is required. Detaching New Relic profiler."));
424+
LogError(L".NET Framework 4.6.1 is required. Detaching New Relic profiler.");
425425
return CORPROF_E_PROFILER_CANCEL_ACTIVATION;
426426
}
427427

0 commit comments

Comments
 (0)