Logging of guests in Crossbar

129 views
Skip to first unread message

Elvis Stansvik

unread,
Mar 21, 2015, 11:48:47 AM3/21/15
to cross...@googlegroups.com
Hi,

I have exactly the same question as this guy:


How do I log stdout from guests in Crossbar? I've tried stdout: log on the guest (crossbar check passes), but I get no output in neither the crossbar start output nor in .crossbar/log (which is empty), even with --loglevel trace (which doesn't seem to affect anything?).

Also, in how do I log output from components in general (not just guests)? Just using whatever Python mechanism for logging I'd normally use? Or does Crossbar have some way of logging different components to different files et.c.?

I can't find much in the docs on logging, except the mentioning of the --logdir and --loglevel flags for crossbar start.

Best regards,
Elvis

Alan Yorinks

unread,
Mar 21, 2015, 4:33:43 PM3/21/15
to cross...@googlegroups.com
Does your guest have:
from twisted.python import log
in the file?

You may also have to add an option to config.json for the guest as described at the bottom of: http://crossbar.io/docs/Guest-Configuration/. You would set stdout to log.

I had the same question and did get it to work, so I know it is possible to do, I just can't remember exactly what I did ;-).

Elvis Stansvik

unread,
Mar 21, 2015, 6:05:58 PM3/21/15
to cross...@googlegroups.com
Hi Alan,

2015-03-21 21:33 GMT+01:00 Alan Yorinks <yor...@gmail.com>:
Does your guest have:
from twisted.python import log
in the file?

No, it does not. But my guest isn't using Twisted at all, so I don't see why that should be necessary? In fact, it is not using WAMP at all. The guest is a simulator for a serial port device, which I start as part of my application. But it does not make use of Crossbar at all. It's just something that needs to run for the application to function properly (other components communicate with it's virtual serial port with Twisted SerialPort though).
 

You may also have to add an option to config.json for the guest as described at the bottom of: http://crossbar.io/docs/Guest-Configuration/. You would set stdout to log.

Yes, like I said in my original mail: "I've tried stdout: log on the guest (crossbar check passes), but I get no output in neither the crossbar start output nor in .crossbar/log (which is empty), even with --loglevel trace (which doesn't seem to affect anything?).".

So I do have stdout: log for the guest in my config.yaml (I'm using YAML syntax instead of JSON).

Elvis


I had the same question and did get it to work, so I know it is possible to do, I just can't remember exactly what I did ;-).

On Saturday, March 21, 2015 at 11:48:47 AM UTC-4, Elvis Stansvik wrote:
Hi,

I have exactly the same question as this guy:


How do I log stdout from guests in Crossbar? I've tried stdout: log on the guest (crossbar check passes), but I get no output in neither the crossbar start output nor in .crossbar/log (which is empty), even with --loglevel trace (which doesn't seem to affect anything?).

Also, in how do I log output from components in general (not just guests)? Just using whatever Python mechanism for logging I'd normally use? Or does Crossbar have some way of logging different components to different files et.c.?

I can't find much in the docs on logging, except the mentioning of the --logdir and --loglevel flags for crossbar start.

Best regards,
Elvis

--
You received this message because you are subscribed to the Google Groups "Crossbar" group.
To unsubscribe from this group and stop receiving emails from it, send an email to crossbario+...@googlegroups.com.
To post to this group, send email to cross...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/crossbario/b6ebd25d-2dd9-43c3-82cb-4cefa41b0c4d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages