# Gr logger and alias

**URL:** <https://www.ruby-forum.com/t/gr-logger-and-alias/233247>\
**Category:** GNU Radio\
**Created:** [November 26, 2014, 8:31pm UTC](https://www.ruby-forum.com/t/gr-logger-and-alias/233247 "2014-11-26T20:31:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [November 26, 2014, 8:31pm UTC](https://www.ruby-forum.com/t/gr-logger-and-alias/233247/1 "2014-11-26T20:31:49Z")

</div>

GR users,

GNURadio 3.7.4 (w/ log4cpp) on Linux (Ubuntu 14).

We have an application that runs several (identical) flowgraphs at once  
and aggregates logs to a central processor. We wanted to differentiate  
the logging info through unique aliases for blocks in different  
flowgraphs. However, it appears that the logger only uses the original  
name of the block for each flowgraph, not the alias we set. So we can’t  
really tell from which flowgraph a particular log entry came from. Any  
ideas on how we could get the logger to use the alias we set as opposed  
to the default name of the block?

Thanks,  
Jared.

---

<div class="post-metadata">

**Author:** ![jared](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/848f3c/32.png) [@jared](https://www.ruby-forum.com/u/jared)\
**Post date:** [December 4, 2014, 7:05pm UTC](https://www.ruby-forum.com/t/gr-logger-and-alias/233247/2 "2014-12-04T19:05:42Z")

</div>

On Wed, Nov 26, 2014 at 2:30 PM, Jared D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> could get the logger to use the alias we set as opposed to the default name  
> of the block?
> 
> Thanks,  
> Jared.

Yes, I just pushed a fix for this issue onto master.

The problem is that the logger name is based off the alias when the  
block  
is created, but we only set the alias ourselves after construction of  
the  
block. That change in the alias was never making it to the logger. This  
is  
now fixed, though, so the block’s will update the logger format whenever  
a  
new alias is defined.

Thanks for pointing it out. It will become part of the 3.7.6 release;  
you  
can find the patch in commit 56f69533d1fa2114cd0a70516bdcc14243cfedfe.

Tom
