---

** [tickets:#2924] base:  unexpected messages which higher than WA priority in 
osaf.log**

**Status:** accepted
**Milestone:** 5.18.09
**Created:** Fri Sep 07, 2018 10:08 AM UTC by Lê Khánh Linh
**Last Updated:** Fri Sep 07, 2018 10:08 AM UTC
**Owner:** Lê Khánh Linh


Ticket [#2306](http://sourceforge.net/p/opensaf/tickets/2306/) described to 
save all logs including ERROR, CRITICAL, ALERT, EMERG into syslog, remaining 
non - error logs including WARNING, NOTICE, INFO, DEBUG should be logged into 
local file oasf.log . There are 2 concerns about this ticket:

- First,  file 
[OpenSAF_Overview_PR](https://sourceforge.net/p/opensaf/documentation/ci/default/tree/OpenSAF_Overview_PR.odt):
 at page 47,  section 3.7.9.1 (Local node log) describes that  all non-error 
logs (NOTICE, DEBUG, INFO) except WARNING should be logged into local file 
osaf.log. The concern is where WARNING is logged.  So this document conflicts 
with which was described in ticket 
[#2306](http://sourceforge.net/p/opensaf/tickets/2306/).

- Second, file logtrace.cc,  fucntion logtrace_log :

Line 148, code checks for logging messages into syslog including WARNING :

~~~
if (global::enable_osaf_log == false || 
         (global::enable_osaf_log && priority <= LOG_WARNING))
~~~

That is wrong because just logs which have ERROR, CRITICAL, ALERT, EMERG 
priority are logged into syslog. WARNING should not be written into osaf.log.

Line 160, code checks whether flag OSAF_LOCAL_NODE_LOG is set or not while it 
does not check which logs should be written. Therefore, all of logs will be 
logged into the local file osaf.log 

~~~
if (global::enable_osaf_log == true) {
    log_output(file, line, priority, CAT_LOG, format, ap2);
 }
~~~



---

Sent from sourceforge.net because [email protected] is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to