优化异常日志输出; 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> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Spectre.Console" Version="0.44.1-preview.0.17" /> <PackageReference Include="Spectre.Console" Version="0.44.1-preview.0.34" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

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

View File

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