[Jack-Devel] Log output for inprocess clients

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Jack-Devel] Log output for inprocess clients

Robert Bielik
Hi all,

I'm putting together an inprocess client (as it was the lowest hanging fruit), but I'd like to output log messages, I note that outputting to stdout/stderr doesn't seem to work.

Is there any API into which I can hook my logging framework output ?

Regards
/Robert

_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Log output for inprocess clients

Robert Bielik
> I'm putting together an inprocess client (as it was the lowest hanging fruit),
> but I'd like to output log messages, I note that outputting to stdout/stderr
> doesn't seem to work.
>
> Is there any API into which I can hook my logging framework output ?

Just for additional information, I have an .so called jackmyplug.so, in /home/pi/jackmyplug.so (exporting jack_initialize/jack_finish), so I load it with:

pi@realtimepi:~ $ jack_load myplug /home/pi/jackmyplug.so
Jack: JackClient::SetupDriverSync driver sem in flush mode
Jack: JackLinuxFutex::Connect name = jack_sem.1000_default_jack_load
Jack: Clock source : system clock via clock_gettime
Jack: JackLibClient::Open name = jack_load refnum = 2
could not load /home/pi/jackmyplug.so, intclient = 0 status = 0x 1

Ideas ?
Regards
/R

_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Log output for inprocess clients

Robert Bielik
> pi@realtimepi:~ $ jack_load myplug /home/pi/jackmyplug.so
> Jack: JackClient::SetupDriverSync driver sem in flush mode
> Jack: JackLinuxFutex::Connect name = jack_sem.1000_default_jack_load
> Jack: Clock source : system clock via clock_gettime
> Jack: JackLibClient::Open name = jack_load refnum = 2
> could not load /home/pi/jackmyplug.so, intclient = 0 status = 0x 1

Ok, ok, slowly getting there, I've now copied the jackmyplug to /usr/local/lib/jack folder, and do:

pi@realtimepi:~ $ jack_load jackmyplug
Jack: JackClient::SetupDriverSync driver sem in flush mode
Jack: JackLinuxFutex::Connect name = jack_sem.1000_default_jack_load
Jack: Clock source : system clock via clock_gettime
Jack: JackLibClient::Open name = jack_load refnum = 2
Jack: JackClient::ClientNotify ref = 3 name = jackmyplug notify = 0
Jack: JackClient::AddClient name = jackmyplug, ref = 3
Jack: JackLinuxFutex::Connect name = jack_sem.1000_default_jackmyplug
Cannot read socket fd = 3 err = No such file or directory
Cannot read socket fd = 5 err = Success
CheckRes error
JackSocketClientChannel read fail
CheckRes error
Jack: JackClientSocket::Close
Could not read result type = 29
jackmyplug is running.
Jack: JackLibClient::ShutDown
Jack: JackClient::ShutDown
Jack: JackPosixThread::ThreadHandler : exit
Cannot write socket fd = 3 err = Broken pipe
CheckRes error
CheckRes error
Could not write request type = 27
Jack: jack_client_close
Jack: JackClient::Close ref = 2
Jack: JackClient::Deactivate
Jack: JackSocketClientChannel::Stop
Jack: JackPosixThread::Kill
Server is not running
Jack: JackClientSocket::Close
Jack: JackClientSocket::Close
Jack: JackLibClient::~JackLibClient
Jack: JackShmReadWritePtr1::~JackShmReadWritePtr1 2
Jack: Succeeded in unlocking 432 byte memory area
Jack: JackLibGlobals Destroy 17d1160
Jack: ~JackLibGlobals
Jack: no message buffer overruns
Jack: JackPosixThread::Stop
Jack: JackPosixThread::ThreadHandler : exit
Jack: JackShmReadWritePtr::~JackShmReadWritePtr 1
Jack: Succeeded in unlocking 1240 byte memory area
Jack: JackShmReadWritePtr::~JackShmReadWritePtr 0
Jack: Succeeded in unlocking 71390368 byte memory area
Jack: jack_client_close res = -1

Upon which the server stopped streaming. Does the above look ok ? None of my log outputs can been seen...

Regards
/Robert
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Log output for inprocess clients

Hanspeter Portner-2
In reply to this post by Robert Bielik
On 01.02.2018 15:16, Robert Bielik wrote:
> Hi all,
>
> I'm putting together an inprocess client (as it was the lowest hanging fruit), but I'd like to output log messages, I note that outputting to stdout/stderr doesn't seem to work.
>
> Is there any API into which I can hook my logging framework output ?

The internal client runs inside the JACK process, that's where it'll
log, too, I guess.

Try to start jackd in a terminal and I'd expect your client's logs to
show up there, not in the terminal where you jack_load'ed it in the
first place.
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org