[prev in list] [next in list] [prev in thread] [next in thread] 

List:       flightgear-devel
Subject:    Re: [Flightgear-devel] Console output
From:       James Turner <james () flightgear ! org>
Date:       2019-11-12 17:02:06
Message-ID: 0B75FC4E-8816-47A5-801A-A024C90A47E3 () flightgear ! org
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On 12 Nov 2019, at 13:41, Julian Smith <jules@op59.net> wrote:
> 
> Maybe we could make the system allow these to be configurable using a
> similar technique to the file:line control? (i.e. add methods to the
> simgear:simgear/debug/logstream.hxx:logstream class to control whether
> they are to be generated, and have flightgear:src/Main/fg_init.cxx call
> these methods in response to changes to properties such
> as /sim/log-time, sim/log-subsytem etc.)

Yep I just reviewed the code, and I'd really prefer to make this fully configurable \
per log output (i.e potentially for console vs log-file vs others)

We need to figure out a way to make it efficient as well of course, right now we have \
a lot of if-switches to handler different options.

Personally I think properties is a bit awkward to configure this, I'd prefer to \
supply a template string (and that's also easier when using multiple log callbacks). \
Of course we can supply a template string *in a property* but allow overriding from \
an env-var.

Again, I ‘just' need to work out an efficient way to process the template string at \
runtime. I'm wondering if we should ditch iostream/fprint and use the template to \
strncpy length-bounded chunks of data into a buffer which we then log. (At particular \
offsets / lengths)

Kind regards,
James


[Attachment #5 (unknown)]

<html><head><meta http-equiv="Content-Type" content="text/html; \
charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; \
line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote \
type="cite" class=""><div class="">On 12 Nov 2019, at 13:41, Julian Smith &lt;<a \
href="mailto:jules@op59.net" class="">jules@op59.net</a>&gt; wrote:</div><br \
class="Apple-interchange-newline"><div class=""><span style="caret-color: rgb(0, 0, \
0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: \
normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: \
0px; text-transform: none; white-space: normal; word-spacing: 0px; \
-webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline \
!important;" class="">Maybe we could make the system allow these to be configurable \
using a</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; \
font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; \
letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; \
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; \
text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: \
Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; \
font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; \
text-transform: none; white-space: normal; word-spacing: 0px; \
-webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline \
!important;" class="">similar technique to the file:line control? (i.e. add methods \
to the</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: \
12px; font-style: normal; font-variant-caps: normal; font-weight: normal; \
letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; \
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; \
text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: \
Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; \
font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; \
text-transform: none; white-space: normal; word-spacing: 0px; \
-webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline \
!important;" class="">simgear:simgear/debug/logstream.hxx:logstream class to control \
whether</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; \
font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; \
letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; \
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; \
text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: \
Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; \
font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; \
text-transform: none; white-space: normal; word-spacing: 0px; \
-webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline \
!important;" class="">they are to be generated, and have \
flightgear:src/Main/fg_init.cxx call</span><br style="caret-color: rgb(0, 0, 0); \
font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: \
normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: \
0px; text-transform: none; white-space: normal; word-spacing: 0px; \
-webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span \
style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; \
font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: \
normal; text-align: start; text-indent: 0px; text-transform: none; white-space: \
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; \
float: none; display: inline !important;" class="">these methods in response to \
changes to properties such</span><br style="caret-color: rgb(0, 0, 0); font-family: \
Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; \
font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; \
text-transform: none; white-space: normal; word-spacing: 0px; \
-webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span \
style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; \
font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: \
normal; text-align: start; text-indent: 0px; text-transform: none; white-space: \
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; \
float: none; display: inline !important;" class="">as /sim/log-time, sim/log-subsytem \
etc.)</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: \
12px; font-style: normal; font-variant-caps: normal; font-weight: normal; \
letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; \
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; \
text-decoration: none;" class=""></div></blockquote></div><br class=""><div \
class="">Yep I just reviewed the code, and I'd really prefer to make this fully \
configurable per log output (i.e potentially for console vs log-file vs \
others)</div><div class=""><br class=""></div><div class="">We need to figure out a \
way to make it efficient as well of course, right now we have a lot of if-switches to \
handler different options.</div><div class=""><br class=""></div><div \
class="">Personally I think properties is a bit awkward to configure this, I'd prefer \
to supply a template string (and that's also easier when using multiple log \
callbacks). Of course we can supply a template string *in a property* but allow \
overriding from an env-var.</div><div class=""><br class=""></div><div \
class="">Again, I ‘just' need to work out an efficient way to process the template \
string at runtime. I'm wondering if we should ditch iostream/fprint and use the \
template to strncpy length-bounded chunks of data into a buffer which we then log. \
(At particular offsets / lengths)</div><div class=""><br class=""></div><div \
class="">Kind regards,</div><div class="">James</div><div class=""><br \
class=""></div></body></html>





_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic