Opened 9 years ago

Closed 7 years ago

#1081 closed defect (fixed)

some log4cplus errors are propagated

Reported by: jinmei Owned by: jelte
Priority: medium Milestone: Sprint-20130108
Component: logging Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: Low
Sub-Project: Core Feature Depending on Ticket:
Estimated Difficulty: 3 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

I've seen these messages when I started BIND10 with some logging
configurations:

log4cplus:ERROR Unable to open file: /home/jinmei/opt/var/log/bind10.log
log4cplus:WARN RollingFileAppender: MaxFileSize property value is too small. Resetting to 204800.
log4cplus:WARN RollingFileAppender: MaxFileSize property value is too small. Resetting to 204800.

These seem to be dumped from liblog4cplus and are propagated to stderr.

IMO our wrapper interface (liblog) should catch (or suppress) these.

Subtickets

Change History (10)

comment:1 Changed 9 years ago by shane

  • Defect Severity changed from N/A to Low
  • Milestone changed from New Tasks to Year 3 Task Backlog

comment:2 Changed 8 years ago by jinmei

  • Milestone set to Next-Sprint-Proposed

We've got a suggested fix:

There is a quiet mode that can be set using
log4cplus::helpers::LogLog::getLogLog()->setQuietMode(true). If it
still prints anything after this, it is probably a bug in log4cplus.
This is for 1.0.4.1. The syntax will be slightly different for trunk
and 1.1.x branches.

comment:3 Changed 7 years ago by jreed

  • Milestone set to Next-Sprint-Proposed

comment:4 Changed 7 years ago by jelte

  • Milestone changed from Next-Sprint-Proposed to Sprint-20130108

comment:5 Changed 7 years ago by jelte

  • Owner set to jelte
  • Status changed from new to assigned

comment:6 Changed 7 years ago by jelte

  • Owner changed from jelte to UnAssigned
  • Status changed from assigned to reviewing

I looked into whether this could also be configured, but internal logging is really just straight to stderr. I don't want to hide all problems, but for 'normal use' we should indeed not have it print anything.

So I'm using the above proposal (setQuietMode), but only if --enable-debug is not set.

Proposed changelog:
[bug] jelte
The log4cplus internal logging mechanism has been disabled, and no output from the log4cplus library itself should be printed to stderr anymore. This output can be enabled by using the compile-time option --enable-debug.

comment:7 Changed 7 years ago by msh

  • Owner changed from UnAssigned to msh

comment:8 Changed 7 years ago by msh

verified code works as advertised.

comment:9 Changed 7 years ago by msh

  • Owner changed from msh to jelte

comment:10 Changed 7 years ago by jelte

  • Resolution set to fixed
  • Status changed from reviewing to closed

thanks! Merged, closing ticket.

Note: See TracTickets for help on using tickets.