Added new logging mechanism to integrate with rdk logger for ccspServ…#1
Added new logging mechanism to integrate with rdk logger for ccspServ…#1sadhyama wants to merge 1 commit intoComcast:masterfrom sadhyama:master
Conversation
|
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"); |
There was a problem hiding this comment.
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
|
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); |
There was a problem hiding this comment.
THis will not show the system error message associated with errno, just the number.
…iceManager