[liblouis-liblouisxml] Re: Preparing logging branch for inclusion

  • From: "Michael Whapples" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "mwhapples@xxxxxxx" for DMARC)
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Mon, 12 May 2014 21:13:37 +0100

Yes precisely. It would be for BrailleBlaster to decide how best to show it to you.


Obviously the application, like BrailleBlaster, could give you a choice where logging output is to go (eg. it could offer choices like:
* Show error messages in a Dialog window
* Output error messages to a file
* output error messages to stderr
* Log to other resource (eg. network, email, etc).

Also the logging API allows BrailleBlaster to define what sort of messages it wants (eg. whether it only wants messages relating to fatal errors or whether it wants full debug output. Again may be BrailleBlaster will offer some configuration of this.

Midhael Whapples

Michael Whapples
On 12/05/2014 19:46, Vic Beckley wrote:
Michael,

So what you are saying is that BrailleBlaster should be able to capture any
errors output from liblouis and liblouisutdml through the logging API and
write that to its log file. Is that correct? This would be without any user
intervention at all, right?

Thanks for the explanation.


Best regards from Ohio,

Vic


-----Original Message-----
From: liblouis-liblouisxml-bounce@xxxxxxxxxxxxx
[mailto:liblouis-liblouisxml-bounce@xxxxxxxxxxxxx] On Behalf Of Michael
Whapples (Redacted sender "mwhapples@xxxxxxx" for DMARC)
Sent: Monday, May 12, 2014 2:27 PM
To: liblouis-liblouisxml@xxxxxxxxxxxxx
Subject: [liblouis-liblouisxml] Re: Preparing logging branch for inclusion

The thought is that liblouis and liblouisutdml are libraries (IE. on
windows they are DLLs), so you as a user will never be running liblouis
or liblouisutdml directly. You will only be using them through another
application.

You should access logging output through the way that application
produces a log.

The logging callback API in liblouis allows the application to gather
the log output from liblouis and liblouisutdml and forward it on to its
own logging system, or may be use it in another way.

For the case of utilities such as file2brl which are included with
liblouisutdml you would check the log file or stderr where that
programme produces output.

Michael Whapples
On 12/05/2014 19:03, Vic Beckley wrote:
Michael and all,

I would agree that at least some level of errors be sent to stderr. As a
normal user, I don't know how to access the logging API. If nothing were
written to stderr that I could get at, I would have no idea what went
wrong.
Maybe I just don't understand what the logging API does.


Best regards from Ohio,

Vic

-----Original Message-----
From: liblouis-liblouisxml-bounce@xxxxxxxxxxxxx
[mailto:liblouis-liblouisxml-bounce@xxxxxxxxxxxxx] On Behalf Of Michael
Whapples (Redacted sender "mwhapples@xxxxxxx" for DMARC)
Sent: Monday, May 12, 2014 7:49 AM
To: liblouis-liblouisxml@xxxxxxxxxxxxx
Subject: [liblouis-liblouisxml] Re: Preparing logging branch for inclusion

The windows nmake stuff seems to be working fine.

I have started on moving the logging code into logging.c.

The removing of printf statements is less clear, I question whether some
of those may be more desirable left as printf to stderr, (eg. out of
memory messages). We may wish to also add logging of the message, but I
could imagine always wanting that to stderr so the user is made aware
why things stopped.

Do people agree with that or do they feel it should go in logging and
the controlling application decides how to show Error, Warning or Fatal
messages from log (eg. for a gui application stderr probably doesn't
make sense).

Michael Whapples
On 09/05/2014 13:04, Mesar Hameed wrote:
Hi Michael,

On Fri 09/05/14,12:30, Michael Whapples wrote:
I was feeling that may be a separate source file should be created
to deal with logging. How would I go about adding another source
file so that the build system picks it up?
I've just pushed a commit to your branch that should do the job.
Things look ok when I build on Linux, but my modifications to the windows
make
file are untested.

thanks,
Mesar
For a description of the software, to download it and links to
project pages go to http://www.abilitiessoft.com

For a description of the software, to download it and links to
project pages go to http://www.abilitiessoft.com
For a description of the software, to download it and links to
project pages go to http://www.abilitiessoft.com

For a description of the software, to download it and links to
project pages go to http://www.abilitiessoft.com

For a description of the software, to download it and links to
project pages go to http://www.abilitiessoft.com

Other related posts: