Andrew Cooper writes ("Re: [Xen-devel] [PATCH v2 01/11] tools/libs/toollog:
Provide a default logger"):
> Although actually, you can't capture stderr in a variable like this at
> all. freopen() at a later point will close the current FILE object and
> create a new one, afte
On 08/11/18 17:31, Andrew Cooper wrote:
> On 08/11/18 17:28, Ian Jackson wrote:
>> Andrew Cooper writes ("Re: [Xen-devel] [PATCH v2 01/11] tools/libs/toollog:
>> Provide a default logger"):
>>> You want something like:
>>>
>>> static xentoollog
On 08/11/18 17:28, Ian Jackson wrote:
> Andrew Cooper writes ("Re: [Xen-devel] [PATCH v2 01/11] tools/libs/toollog:
> Provide a default logger"):
>> You want something like:
>>
>> static xentoollog_logger_stdiostream stdio_logger = {
>> .vtable = {
>
On 08/11/18 17:07, Ian Jackson wrote:
> This is most conveniently done like this because xtl_logger_stdio.c
> knows how to provide a static logger without doing any memory
> allocations. That's useful because it can't fail.
>
> Add the new symbol to the map file and bump the minor version
>
Andrew Cooper writes ("Re: [Xen-devel] [PATCH v2 01/11] tools/libs/toollog:
Provide a default logger"):
> You want something like:
>
> static xentoollog_logger_stdiostream stdio_logger = {
> .vtable = {
> .vmessage = stdiostream_vmessage,
> .pro
This is most conveniently done like this because xtl_logger_stdio.c
knows how to provide a static logger without doing any memory
allocations. That's useful because it can't fail.
Add the new symbol to the map file and bump the minor version
accordingly.
Signed-off-by: Ian Jackson
CC: Wei Liu