On Thu, Jan 22, 2015 at 04:23:00PM -0600, Tyler Hicks wrote:
> On 2015-01-22 10:11:42, John Johansen wrote:
> > I'm all for removing regular prints from the code for the library but
> > do we really want to remove debug prints that only show up when the code
> > is compiled with debugging enabled?
> 
> Good question. libapparmor currently has no debug logging so I continued
> that tradition.

That's not entirely accurate. While it's not built into the configure
system, you can set YYDEBUG to a non-zero value in src/grammar.y
to get bison debugging output. I make use of this when I need to
diagnose why the logparsing stuff doesn't catch a message, usually
due to random changes to log formatting.

For diagnosing things going wrong, I'd like to see more debugging
instrumentation in libapparmor, not less.

> We don't know what a program linking to libapparmor will do with
> stdout/stderr so I don't know if debug logging to those streams is
> helpful.
> 
> Maybe in the near future we could add a debug build option to
> libapparmor and have it support an env variable that specifies a file
> path to open and log debug messages to?

That would be a very nice improvement indeed.

-- 
Steve Beattie
<sbeat...@ubuntu.com>
http://NxNW.org/~steve/

Attachment: signature.asc
Description: Digital signature

-- 
AppArmor mailing list
AppArmor@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor

Reply via email to