优化异常日志输出; fix #9

This commit is contained in:
nilaoda 2022-08-20 20:52:47 +08:00
parent c238784caa
commit 2836e00b5e
3 changed files with 3 additions and 3 deletions

View File

@ -10,7 +10,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Spectre.Console" Version="0.44.1-preview.0.17" />
<PackageReference Include="Spectre.Console" Version="0.44.1-preview.0.34" />
</ItemGroup>
</Project>

View File

@ -7,7 +7,7 @@
<TrimMode>full</TrimMode>
<TrimmerDefaultAction>link</TrimmerDefaultAction>
<IlcTrimMetadata>true</IlcTrimMetadata>
<IlcGenerateStackTraceData>false</IlcGenerateStackTraceData>
<IlcGenerateStackTraceData>true</IlcGenerateStackTraceData>
<SatelliteResourceLanguages>zh-CN;zh-TW;en-US</SatelliteResourceLanguages>
<NativeAotCompilerVersion>7.0.0-*</NativeAotCompilerVersion>
</PropertyGroup>

View File

@ -242,7 +242,7 @@ namespace N_m3u8DL_RE
}
catch (Exception ex)
{
string msg = ex.Message;
string msg = Logger.LogLevel == LogLevel.DEBUG ? ex.ToString() : ex.Message;
#if DEBUG
msg = ex.ToString();
#endif