Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot manage logs properly #49

Closed
liuyangedward opened this issue Mar 12, 2018 · 3 comments
Closed

Cannot manage logs properly #49

liuyangedward opened this issue Mar 12, 2018 · 3 comments
Labels
enhancement successful streaming working end to end streaming

Comments

@liuyangedward
Copy link

Hi team,

First of all, I'd like to thank you for offering this awesome tool.

Currently, I'm working on integrating kinesis logs into our logging scheme. I've managed to deal with those generated from log4cplus but I found it tricky when dealing with those generated from DLOGX (those macros in PlatformUtils.h). To start with, I'd like to turn the log off (the next step would be to redirect them to a file), is there a way to achieve that without modifying source file?

Below are some of the logs that I hope to get rid of,
getKinesisVideoStreamMetrics(): Get stream metrics for Stream 0000000003ee1586.
getKinesisVideoMetrics(): Get the memory metrics size.

Thank you!

Regards
Edward

@MushMal
Copy link
Contributor

MushMal commented Mar 12, 2018

@liuyangedward Thanks for your comments. The PIC (Platform Independent Codebase) layer has been designed with full portability in mind. The logging in your case gets defaulted to the system output - the logging is built using the macros which eventually result in a log API call with the right information level. This is the API that we are not exposing through the plumbing yet.

We are working on exposing the logging API through the callbacks so the C++ layer can implement it using log4cpp.
In the interim, you can modify the PlatformUtils.h to map LN:28
#define __LOG(p1, p2, p3, ...) printf(p3, ##VA_ARGS) to a logger you need - in your case log4cpp call.
However, if you simply want to disable the metrics logging (which for the diagnostics purposes we print out on each key frame) you can modify the code in KinesisVideoStream.cpp LN 37 and simply remove this if block or put an unconditional false statement - something like this

if (FALSE && (frame.flags & FRAME_FLAG_KEY_FRAME) == FRAME_FLAG_KEY_FRAME) {

@unicornss unicornss added the successful streaming working end to end streaming label Apr 12, 2018
@zhiyua-git
Copy link
Contributor

@liuyangedward We just released the version 1.4.0 with logging API exposed to C++ layer, can you check it out and have a try? Thanks.

@unicornss
Copy link
Contributor

Closing the issue for now. If additional support is required please reopen. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement successful streaming working end to end streaming
Projects
None yet
Development

No branches or pull requests

4 participants