Common Tests and logs

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

Common Tests and logs

Roberto Ostinelli-5
All,
I'm having a hard time to get the logs of slave nodes in Common Tests, started with ct_slave:start/1,2,3. More specifically, when I use ct:pal I only see the messages on the main ct@ node.

How can I capture logs running on slave nodes? Given that io:format also does not work in the CT environment, I'm not really sure how to proceed.

Thank you,
r.
Reply | Threaded
Open this post in threaded view
|

Re: Common Tests and logs

Boroska András
Hi Roberto,

Did you try io:format/3 where the first argument is the 'user' atom?

Br,
Andras 

On Sat, Nov 16, 2019 at 9:37 PM Roberto Ostinelli <[hidden email]> wrote:
All,
I'm having a hard time to get the logs of slave nodes in Common Tests, started with ct_slave:start/1,2,3. More specifically, when I use ct:pal I only see the messages on the main ct@ node.

How can I capture logs running on slave nodes? Given that io:format also does not work in the CT environment, I'm not really sure how to proceed.

Thank you,
r.
Reply | Threaded
Open this post in threaded view
|

Re: Common Tests and logs

Roberto Ostinelli-5
Hey Andras,
This still doesn't print logs for other nodes AFAIK. I've ended up redirecting all logs to disk during tests, with something like error_logger:logfile({open, atom_to_list(node())}). This makes individual log files be created in the test result's directory...

If there is a better solution, I'd love to hear it.

On Sat, Nov 16, 2019 at 11:08 PM Boroska András <[hidden email]> wrote:
Hi Roberto,

Did you try io:format/3 where the first argument is the 'user' atom?

Br,
Andras 

On Sat, Nov 16, 2019 at 9:37 PM Roberto Ostinelli <[hidden email]> wrote:
All,
I'm having a hard time to get the logs of slave nodes in Common Tests, started with ct_slave:start/1,2,3. More specifically, when I use ct:pal I only see the messages on the main ct@ node.

How can I capture logs running on slave nodes? Given that io:format also does not work in the CT environment, I'm not really sure how to proceed.

Thank you,
r.
Reply | Threaded
Open this post in threaded view
|

Re: Common Tests and logs

Luis Rascão-2
Hi,
I've seen that partisan has a test suite that uses slave nodes each producing a set of logs (lager) in their own directory, maybe this helps
lr

On Sun, Nov 17, 2019 at 1:03 PM Roberto Ostinelli <[hidden email]> wrote:
Hey Andras,
This still doesn't print logs for other nodes AFAIK. I've ended up redirecting all logs to disk during tests, with something like error_logger:logfile({open, atom_to_list(node())}). This makes individual log files be created in the test result's directory...

If there is a better solution, I'd love to hear it.

On Sat, Nov 16, 2019 at 11:08 PM Boroska András <[hidden email]> wrote:
Hi Roberto,

Did you try io:format/3 where the first argument is the 'user' atom?

Br,
Andras 

On Sat, Nov 16, 2019 at 9:37 PM Roberto Ostinelli <[hidden email]> wrote:
All,
I'm having a hard time to get the logs of slave nodes in Common Tests, started with ct_slave:start/1,2,3. More specifically, when I use ct:pal I only see the messages on the main ct@ node.

How can I capture logs running on slave nodes? Given that io:format also does not work in the CT environment, I'm not really sure how to proceed.

Thank you,
r.


--
PGP fingerprint: F708 E141 AE8D 2D38 E1BC  DF3D 1719 3EA0 647D 7260