mirror of
https://github.com/BililiveRecorder/BililiveRecorder.git
synced 2024-11-15 19:22:19 +08:00
修改日志输出相关
This commit is contained in:
parent
5545e6f66d
commit
1831bc67b1
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -261,3 +261,4 @@ __pycache__/
|
|||
*.pyc
|
||||
|
||||
BililiveRecorder.WPF/BuildInfo.cs
|
||||
BililiveRecorder.WPF/Nlog.config
|
||||
|
|
|
@ -151,8 +151,15 @@ namespace BililiveRecorder.Core
|
|||
}
|
||||
else
|
||||
{
|
||||
// response.StatusCode == HttpStatusCode.OK
|
||||
Processor = new FlvStreamProcessor(_settings.Feature != EnabledFeature.ClipOnly ? RecordInfo.GetStreamFilePath() : null, _settings.Feature == EnabledFeature.RecordOnly);
|
||||
string savepath = _settings.Feature != EnabledFeature.ClipOnly ? RecordInfo.GetStreamFilePath() : null;
|
||||
logger.Log(RealRoomid, LogLevel.Info, "开始下载直播流" + savepath != null ? " 并保存到 " + Path.GetFileName(savepath) : "");
|
||||
|
||||
if (triggerType == TriggerType.HttpApiRecheck)
|
||||
{
|
||||
triggerType = TriggerType.HttpApi;
|
||||
}
|
||||
|
||||
Processor = new FlvStreamProcessor(savepath, _settings.Feature == EnabledFeature.RecordOnly);
|
||||
Processor.TagProcessed += Processor_TagProcessed;
|
||||
Processor.StreamFinalized += Processor_StreamFinalized;
|
||||
Processor.GetFileName = RecordInfo.GetStreamFilePath;
|
||||
|
|
|
@ -283,7 +283,7 @@ namespace BililiveRecorder.FlvProcessor
|
|||
{
|
||||
lock (_writelock)
|
||||
{
|
||||
logger.Info("剪辑处理中,将会保存过去 {0} 秒和将来 {1} 秒的直播", (Tags[Tags.Count - 1].TimeStamp - Tags[0].TimeStamp) / 1000d, Clip_Future);
|
||||
logger.Info("剪辑处理中,将会保存过去 {0} 秒和将来 {1} 秒的直播流", (Tags[Tags.Count - 1].TimeStamp - Tags[0].TimeStamp) / 1000d, Clip_Future);
|
||||
return new FlvClipProcessor(Metadata, HTags, new List<FlvTag>(Tags.ToArray()), Clip_Future);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -164,7 +164,10 @@
|
|||
<Content Include="NLog.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Nlog.Release.config" />
|
||||
<None Include="Nlog.Release.config" />
|
||||
<None Include="NLog.Debug.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="NLog.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
|
@ -1223,6 +1226,7 @@
|
|||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>cd $(SolutionDir)
|
||||
PowerShell -ExecutionPolicy Bypass -File .\CI\patch_buildinfo.ps1</PreBuildEvent>
|
||||
PowerShell -ExecutionPolicy Bypass -File .\CI\patch_buildinfo.ps1
|
||||
copy /y .\BililiveRecorder.WPF\Nlog.$(ConfigurationName).config .\BililiveRecorder.WPF\NLog.config</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -17,7 +17,7 @@
|
|||
-->
|
||||
<targets>
|
||||
<target name="WPFLogger" xsi:type="MethodCall" className="BililiveRecorder.WPF.MainWindow, BililiveRecorder.WPF" methodName="AddLog">
|
||||
<parameter layout="[${date:format=HH\:mm\:ss}] ${uppercase:${level}} ${message} ${exception:format=ToString,StackTrace}" />
|
||||
<parameter layout="[${date:format=HH\:mm\:ss}] ${uppercase:${level}} ${event-properties:item=roomid} ${message} ${exception:format=ToString,StackTrace}" />
|
||||
</target>
|
||||
<!--
|
||||
add your targets here
|
|
@ -7,7 +7,7 @@
|
|||
internalLogLevel="Off" internalLogFile="c:\temp\nlog-internal.log">
|
||||
<targets>
|
||||
<target name="WPFLogger" xsi:type="MethodCall" className="BililiveRecorder.WPF.MainWindow, BililiveRecorder.WPF" methodName="AddLog">
|
||||
<parameter layout="[${date:format=HH\:mm\:ss}] ${uppercase:${level}} ${message} ${exception:format=ToString,StackTrace}" />
|
||||
<parameter layout="[${date:format=HH\:mm\:ss}] ${uppercase:${level}} ${event-properties:item=roomid} ${message} ${exception:format=ToString,StackTrace}" />
|
||||
</target>
|
||||
</targets>
|
||||
<rules>
|
||||
|
|
Loading…
Reference in New Issue
Block a user