在 gstreamer 中禁用 DEBUG 日志?
Disable DEBUG logs in gstreamer?
我是运行 gstreamer in docker和GST_DEBUG
可以用来开启额外的调试日志,但是即使我设置了GST_DEBUG=2
或者GST_DEBUG=3
,那么几个 DEBUG
日志仍然会发生。这是一个例子:
2021-10-08 14:04:55 [139759980640000] DEBUG - postReadCallback(): Wrote 65524 bytes to Kinesis Video. Upload stream handle: 0
2021-10-08 14:04:55 [139759980640000] DEBUG - postReadCallback(): Wrote 65524 bytes to Kinesis Video. Upload stream handle: 0
2021-10-08 14:04:55 [139759980640000] DEBUG - postReadCallback(): Wrote 65524 bytes to Kinesis Video. Upload stream handle: 0
2021-10-08 14:04:55 [139759980640000] DEBUG - postReadCallback(): Wrote 31003 bytes to Kinesis Video. Upload stream handle: 0
2021-10-08 14:04:55 [139759980640000] DEBUG - postReadCallback(): Pausing CURL read for upload handle: 0
2021-10-08 14:04:55 [139759980640000] DEBUG - postWriteCallback(): Curl post body write function for stream with handle: DaveTest and upload handle: 0 returned: {"EventType":"RECEIVED","FragmentTimecode":1633701893567,"FragmentNumber":"91343852333181580945486776886085710683522911738"}
2021-10-08 14:04:55 [139759980640000] DEBUG - fragmentAckReceivedHandler invoked
2021-10-08 14:04:55 [139759980640000] DEBUG - postReadCallback(): Wrote 20153 bytes to Kinesis Video. Upload stream handle: 0
2021-10-08 14:04:55 [139759980640000] DEBUG - postReadCallback(): Pausing CURL read for upload handle: 0
2021-10-08 14:04:55 [139759980640000] DEBUG - postWriteCallback(): Curl post body write function for stream with handle: DaveTest and upload handle: 0 returned: {"EventType":"BUFFERING","FragmentTimecode":1633701895543,"FragmentNumber":"91343852333181580950438537043227232143278319293"}
2021-10-08 14:04:55 [139759980640000] DEBUG - fragmentAckReceivedHandler invoked
2021-10-08 14:04:55 [139759980640000] DEBUG - postWriteCallback(): Curl post body write function for stream with handle: DaveTest and upload handle: 0 returned: {"EventType":"PERSISTED","FragmentTimecode":1633701893567,"FragmentNumber":"91343852333181580945486776886085710683522911738"}
2021-10-08 14:04:55 [139759980640000] DEBUG - fragmentAckReceivedHandler invoked
2021-10-08 14:04:55 [139759980640000] DEBUG - postReadCallback(): Wrote 9598 bytes to Kinesis Video. Upload stream handle: 0
2021-10-08 14:04:55 [139759980640000] DEBUG - postReadCallback(): Pausing CURL read for upload handle: 0
2021-10-08 14:04:55 [139759980640000] DEBUG - Kinesis Video client and stream metrics
>> Overall storage byte size: 536870912
>> Available storage byte size: 536261448
>> Allocated storage byte size: 609464
>> Total view allocation byte size: 144080
>> Total streams frame rate (fps): 1175
>> Total streams transfer rate (bps): 29187312 (28503 Kbps)
>> Current view duration (ms): 433
>> Overall view duration (ms): 1999
>> Current view byte size: 283686
>> Overall view byte size: 606536
>> Current frame rate (fps): 1175.58
>> Current transfer rate (bps): 29187312 (28503 Kbps)
如何关闭这些功能?
你究竟是如何设置这个变量的?我通过导出它多次使用它:export GST_DEBUG=3
并且它按预期工作。请参阅此 link:https://gstreamer.freedesktop.org/documentation/gstreamer/gstinfo.html?gi-language=c 了解如何以编程方式使用它的信息。
问题出在 kvssink
插件上,它有自己的日志记录设置。它可以使用配置文件和 log-config
以及该文件的路径进行设置 (see here)
我是运行 gstreamer in docker和GST_DEBUG
可以用来开启额外的调试日志,但是即使我设置了GST_DEBUG=2
或者GST_DEBUG=3
,那么几个 DEBUG
日志仍然会发生。这是一个例子:
2021-10-08 14:04:55 [139759980640000] DEBUG - postReadCallback(): Wrote 65524 bytes to Kinesis Video. Upload stream handle: 0
2021-10-08 14:04:55 [139759980640000] DEBUG - postReadCallback(): Wrote 65524 bytes to Kinesis Video. Upload stream handle: 0
2021-10-08 14:04:55 [139759980640000] DEBUG - postReadCallback(): Wrote 65524 bytes to Kinesis Video. Upload stream handle: 0
2021-10-08 14:04:55 [139759980640000] DEBUG - postReadCallback(): Wrote 31003 bytes to Kinesis Video. Upload stream handle: 0
2021-10-08 14:04:55 [139759980640000] DEBUG - postReadCallback(): Pausing CURL read for upload handle: 0
2021-10-08 14:04:55 [139759980640000] DEBUG - postWriteCallback(): Curl post body write function for stream with handle: DaveTest and upload handle: 0 returned: {"EventType":"RECEIVED","FragmentTimecode":1633701893567,"FragmentNumber":"91343852333181580945486776886085710683522911738"}
2021-10-08 14:04:55 [139759980640000] DEBUG - fragmentAckReceivedHandler invoked
2021-10-08 14:04:55 [139759980640000] DEBUG - postReadCallback(): Wrote 20153 bytes to Kinesis Video. Upload stream handle: 0
2021-10-08 14:04:55 [139759980640000] DEBUG - postReadCallback(): Pausing CURL read for upload handle: 0
2021-10-08 14:04:55 [139759980640000] DEBUG - postWriteCallback(): Curl post body write function for stream with handle: DaveTest and upload handle: 0 returned: {"EventType":"BUFFERING","FragmentTimecode":1633701895543,"FragmentNumber":"91343852333181580950438537043227232143278319293"}
2021-10-08 14:04:55 [139759980640000] DEBUG - fragmentAckReceivedHandler invoked
2021-10-08 14:04:55 [139759980640000] DEBUG - postWriteCallback(): Curl post body write function for stream with handle: DaveTest and upload handle: 0 returned: {"EventType":"PERSISTED","FragmentTimecode":1633701893567,"FragmentNumber":"91343852333181580945486776886085710683522911738"}
2021-10-08 14:04:55 [139759980640000] DEBUG - fragmentAckReceivedHandler invoked
2021-10-08 14:04:55 [139759980640000] DEBUG - postReadCallback(): Wrote 9598 bytes to Kinesis Video. Upload stream handle: 0
2021-10-08 14:04:55 [139759980640000] DEBUG - postReadCallback(): Pausing CURL read for upload handle: 0
2021-10-08 14:04:55 [139759980640000] DEBUG - Kinesis Video client and stream metrics
>> Overall storage byte size: 536870912
>> Available storage byte size: 536261448
>> Allocated storage byte size: 609464
>> Total view allocation byte size: 144080
>> Total streams frame rate (fps): 1175
>> Total streams transfer rate (bps): 29187312 (28503 Kbps)
>> Current view duration (ms): 433
>> Overall view duration (ms): 1999
>> Current view byte size: 283686
>> Overall view byte size: 606536
>> Current frame rate (fps): 1175.58
>> Current transfer rate (bps): 29187312 (28503 Kbps)
如何关闭这些功能?
你究竟是如何设置这个变量的?我通过导出它多次使用它:export GST_DEBUG=3
并且它按预期工作。请参阅此 link:https://gstreamer.freedesktop.org/documentation/gstreamer/gstinfo.html?gi-language=c 了解如何以编程方式使用它的信息。
问题出在 kvssink
插件上,它有自己的日志记录设置。它可以使用配置文件和 log-config
以及该文件的路径进行设置 (see here)