- Description has changed:

Diff:

~~~~

--- old
+++ new
@@ -16,9 +16,23 @@
          (global::enable_osaf_log && priority <= LOG_WARNING))
 ~~~
 
-- Third, ERROR logs are also logged into the local file osaf.log: 
-> root@SC-1:/var/log# grep "error" /var/log/opensaf/osaf.log 
-> <142>1 2018-09-10T14:15:42.194004+07:00 SC-1 osafimmpbed 237 osaf.log [meta 
sequenceId="8"] 237:imm/common/immpbe_dump.cc:538 IN Could not move 
/srv/shared/imm/imm.db to /srv/shared/imm/imm.db.prev** error**:No such file or 
directory - ok for initial pbe-enable
+- Third, ERROR, CRITICAL, ALERT, EMERGENCY logs are also logged into the local 
file osaf.log: 
+ERROR Logs:
+root@SC-1:~# grep " ER " /var/log/opensaf/osaf.log
+<139>1 2018-09-11T17:27:56.489759+07:00 SC-1 osafimmd 196 osaf.log [meta 
sequenceId="4"] 196:imm/immd/immd_main.c:294 ER >>>>>>>>> Test log ERROR where 
to logged
+<139>1 2018-09-11T17:27:56.584763+07:00 SC-1 osafimmnd 207 osaf.log [meta 
sequenceId="4"] 207:imm/immnd/immnd_main.c:465 ER >>>>>>>>> Test log ERROR 
where ND to logged
+CRITICAL Logs:
+root@SC-1:~# grep " CR " /var/log/opensaf/osaf.log
+<138>1 2018-09-11T17:27:56.489442+07:00 SC-1 osafimmd 196 osaf.log [meta 
sequenceId="3"] 196:imm/immd/immd_main.c:293 CR >>>>>>>>> Test log CRITICAL 
where to logged
+<138>1 2018-09-11T17:27:56.584506+07:00 SC-1 osafimmnd 207 osaf.log [meta 
sequenceId="3"] 207:imm/immnd/immnd_main.c:464 CR >>>>>>>>> Test log CRITICAL 
where ND to logged
+ALERT Logs:
+root@SC-1:~# grep " AL " /var/log/opensaf/osaf.log
+<137>1 2018-09-11T17:27:56.489004+07:00 SC-1 osafimmd 196 osaf.log [meta 
sequenceId="2"] 196:imm/immd/immd_main.c:292 AL >>>>>>>>> Test log ALERT where 
to logged
+<137>1 2018-09-11T17:27:56.584195+07:00 SC-1 osafimmnd 207 osaf.log [meta 
sequenceId="2"] 207:imm/immnd/immnd_main.c:463 AL >>>>>>>>> Test log ALERT 
where ND to logged
+EMERGENCY Logs:
+root@SC-1:~# grep " EM " /var/log/opensaf/osaf.log
+<136>1 2018-09-11T17:27:56.488381+07:00 SC-1 osafimmd 196 osaf.log [meta 
sequenceId="1"] 196:imm/immd/immd_main.c:291 EM >>>>>>>>> Test log EMERGENCY 
where to be logged
+<136>1 2018-09-11T17:27:56.583837+07:00 SC-1 osafimmnd 207 osaf.log [meta 
sequenceId="1"] 207:imm/immnd/immnd_main.c:462 EM >>>>>>>>> Test log EMERGENCY 
ND where to be logged
 
 Our expectation is that non-error logs (WARNING, NOTICE, DEBUG, INFO) are 
logged into the local file osaf.log.
 

~~~~




---

** [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:** Mon Sep 10, 2018 09:16 AM UTC
**Owner:** Lê Khánh Linh


Currently, there are 3 concerns related to WARNING messages that should be 
resolved:

- 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) should be logged into local file osaf.log except 
WARNING. In addition, ticket 
[#2306](http://sourceforge.net/p/opensaf/tickets/2306/) described to save all 
logs including ERROR, CRITICAL, ALERT, EMERG into syslog. Therefore the concern 
is where WARNING is logged.

- Second, WARNING logs are also logged into syslog:
> root@SC-1:/var/log# grep " WA " /var/log/syslog 
> 2018-09-10 14:15:41.313 SC-1 osafimmloadd: WA Could not open repository:imm.db
> 2018-09-10 14:15:41.530 SC-1 osafimmnd[207]: WA IMM Access Control mode is 
> DISABLED!
> 2018-09-10 14:15:43.198 SC-1 osafckptd[417]: WA saImmOiImplementerSet 
> returned 9

Our expectation is that ERROR, CRITICAL, ALERT, EMERG should logged into syslog 
not WARNING
This fault is in 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))
~~~

- Third, ERROR, CRITICAL, ALERT, EMERGENCY logs are also logged into the local 
file osaf.log: 
ERROR Logs:
root@SC-1:~# grep " ER " /var/log/opensaf/osaf.log
<139>1 2018-09-11T17:27:56.489759+07:00 SC-1 osafimmd 196 osaf.log [meta 
sequenceId="4"] 196:imm/immd/immd_main.c:294 ER >>>>>>>>> Test log ERROR where 
to logged
<139>1 2018-09-11T17:27:56.584763+07:00 SC-1 osafimmnd 207 osaf.log [meta 
sequenceId="4"] 207:imm/immnd/immnd_main.c:465 ER >>>>>>>>> Test log ERROR 
where ND to logged
CRITICAL Logs:
root@SC-1:~# grep " CR " /var/log/opensaf/osaf.log
<138>1 2018-09-11T17:27:56.489442+07:00 SC-1 osafimmd 196 osaf.log [meta 
sequenceId="3"] 196:imm/immd/immd_main.c:293 CR >>>>>>>>> Test log CRITICAL 
where to logged
<138>1 2018-09-11T17:27:56.584506+07:00 SC-1 osafimmnd 207 osaf.log [meta 
sequenceId="3"] 207:imm/immnd/immnd_main.c:464 CR >>>>>>>>> Test log CRITICAL 
where ND to logged
ALERT Logs:
root@SC-1:~# grep " AL " /var/log/opensaf/osaf.log
<137>1 2018-09-11T17:27:56.489004+07:00 SC-1 osafimmd 196 osaf.log [meta 
sequenceId="2"] 196:imm/immd/immd_main.c:292 AL >>>>>>>>> Test log ALERT where 
to logged
<137>1 2018-09-11T17:27:56.584195+07:00 SC-1 osafimmnd 207 osaf.log [meta 
sequenceId="2"] 207:imm/immnd/immnd_main.c:463 AL >>>>>>>>> Test log ALERT 
where ND to logged
EMERGENCY Logs:
root@SC-1:~# grep " EM " /var/log/opensaf/osaf.log
<136>1 2018-09-11T17:27:56.488381+07:00 SC-1 osafimmd 196 osaf.log [meta 
sequenceId="1"] 196:imm/immd/immd_main.c:291 EM >>>>>>>>> Test log EMERGENCY 
where to be logged
<136>1 2018-09-11T17:27:56.583837+07:00 SC-1 osafimmnd 207 osaf.log [meta 
sequenceId="1"] 207:imm/immnd/immnd_main.c:462 EM >>>>>>>>> Test log EMERGENCY 
ND where to be logged

Our expectation is that non-error logs (WARNING, NOTICE, DEBUG, INFO) are 
logged into the local file osaf.log.

This fault is in 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.
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to