← Back to team overview

unity-dev team mailing list archive

Re: LOG_DEBUG output and System Indicators?

 

On 28/07/15 22:26, Mohsen Ibrahim wrote:
> 
> 
> ------------------------------------------------------------------------
> From: mohsen47@xxxxxxxxxxxxx
> To: marco.trevisan@xxxxxxxxxxxxx; unity-dev@xxxxxxxxxxxxxxxxxxx
> Date: Tue, 28 Jul 2015 09:53:38 +0000
> Subject: Re: [Unity-dev] LOG_DEBUG output and System Indicators?
> 
>>I wrote a small program to test logging with nux it is here
> http://pastebin.ubuntu.com/11952628/
> 
>>And I executed export UNITY_LOG_SEVERITY="<root>=DEBUG", if I run the
> program I only get the >Warning 1 message at standard output. How can I
> fix this?
> 
> I managed to fix this in my program.Emoji
> 
>>If I fixed this can I redirect the standard output of unity to some log
> file? because if unity writes the >debug messages to standard output I
> cannot read them
> This is still unsolved Emoji, If the log output is printed to stdout
> where can I find it? How can I read it? Please help.

The nux logging defaults to warning. The UNITY_LOG_SEVERITY environment
variable is something that is handled in the initialisation of unity
itself to configure the logging.

By default, I think the logging goes to stderr. Any capturing of the
logging is handled by something wrapping the executable.

The logging code itself does handle multiple log writers IIRC.

/me goes to glance at the code...

http://bazaar.launchpad.net/~unity-team/nux/trunk/view/head:/NuxCore/Logger.h#L100

The comment there mentions this to configure logging:

nux::logging::configure_logging(::getenv("MY_APP_LOGGING_CONFIG"));

Please read the header file to work out how to use it.

The comments there do, I think, give reasonable examples on how to use it.

Good luck.

Tim


Follow ups

References