Skip to content
This repository was archived by the owner on May 21, 2021. It is now read-only.

Added new logging mechanism to integrate with rdk logger for ccspServ…#1

Open
sadhyama wants to merge 1 commit intoComcast:masterfrom
sadhyama:master
Open

Added new logging mechanism to integrate with rdk logger for ccspServ…#1
sadhyama wants to merge 1 commit intoComcast:masterfrom
sadhyama:master

Conversation

@sadhyama
Copy link

…iceManager

@bill1600
Copy link
Collaborator

We need the log_not function, to specify debug messages not currently appearing but which we may want in the future.

log_errno does not work properly anymore. It used to display a system message associated with errno. Now it just displays the number.

The dbg functions should not be removed. They are used for displaying messages before the logger has been set up. These messages may not be seen except in a test environment, but we still need them to appear when we are running a test environment. For example, there is an error when the directory supplied to svc_agt_init is wrong in some way. Well, if this directory is wrong, then the logger does not know where to put messages, and cannot succeed. But we still need to see a dbg messages when running in a test environment.

The option to use the timestamps and logging output that I orginally provided should be preserved, not simply removed.

svcagt_log (LEVEL_INFO, "processing svc_agt_init..\n");
if (NULL == svcagt_directory) {
dbg ("svc_agt init NULL svcagt directory provided\n");
svcagt_log (LEVEL_DEBUG,"svc_agt init NULL svcagt directory provided\n");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But if the logger has not been set up yet, then obviously this call won't succeed.
That's what dbg is for. See conversation

@bill1600
Copy link
Collaborator

The logger as I had it provided for error messages to appear both in a file, AND on the screen, when in a test environment. This should be preservced.

if (dirp == NULL) {
log_errno (errno, "Could not open systemd directory %s\n", services_dir);
if (dirp == NULL) {
svcagt_log (LEVEL_ERROR,"Could not open systemd directory %s, errno:%d\n", services_dir, errno);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

THis will not show the system error message associated with errno, just the number.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants