File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,8 @@ public async Task<ActionResult> HandleCaptureImageCommand(BotRequest request)
18
18
if ( ! result || image is null )
19
19
{
20
20
// 编解码失败
21
- logger . LogError ( "Decode failed, send error message." ) ;
22
- response . Message = "杰哥不要!(图像编解码失败 )" ;
21
+ logger . LogError ( "Capture failed, send error message." ) ;
22
+ response . Message = "杰哥不要!(图像获取失败 )" ;
23
23
}
24
24
else
25
25
{
@@ -29,8 +29,8 @@ public async Task<ActionResult> HandleCaptureImageCommand(BotRequest request)
29
29
}
30
30
catch ( Exception e )
31
31
{
32
- logger . LogError ( e , "Failed to decode and encode." ) ;
33
- response . Message = "你最好不要说出去,我知道你的学校和班级:\n " + e . Message + e . StackTrace ;
32
+ logger . LogError ( e , "Failed to decode or encode." ) ;
33
+ response . Message = "你最好不要说出去,我知道你的学校和班级(图像编解码崩溃) :\n " + e . Message + e . StackTrace ;
34
34
}
35
35
finally
36
36
{
Original file line number Diff line number Diff line change @@ -233,7 +233,7 @@ public void DecodeNextFrameUnsafe()
233
233
{
234
234
// 解码失败
235
235
var error = new TaskCanceledException ( "Decode timeout." ) ;
236
- _logger . LogError ( error , "Failed to decode.\n " ) ;
236
+ _logger . LogError ( error , "Failed to decode." ) ;
237
237
238
238
throw error ;
239
239
}
@@ -314,11 +314,11 @@ private void FlushDecoderBufferUnsafe(CancellationToken cancellationToken)
314
314
var captureTimeSpan = DateTime . Now - LastCaptureTime ;
315
315
if ( LastCapturedImage != null && captureTimeSpan < _streamOption . Value . CacheTimeout )
316
316
{
317
- _logger . LogInformation ( "Return image cached {time} ago." , captureTimeSpan ) ;
317
+ _logger . LogInformation ( "Return image cached {time:c } ago." , captureTimeSpan ) ;
318
318
return ( true , LastCapturedImage ) ;
319
319
}
320
320
321
- _logger . LogInformation ( "Image cached {time} ago has expired, capture new." , captureTimeSpan ) ;
321
+ _logger . LogInformation ( "Image cached {time:c } ago has expired, capture new." , captureTimeSpan ) ;
322
322
323
323
OpenInput ( ) ;
324
324
You can’t perform that action at this time.
0 commit comments