OPCUA::Open62541::Test::Logger - manage open62541 log file for testing
use OPCUA::Open62541::Test::Logger; my $logger = OPCUA::Open62541::Test::Server->logger();
Write the output of a server into a log file. Wait until a given regular expression matches a line in the file.
- $logger = OPCUA::Open62541::Test::Logger->new(%args);
Create a new test logger instance. Usually called from test server.
Start writing to log file.
- $logger->loggrep($regex, $timeout, $count)
Check if regex is present in the log file. If the process is still alive and a timeout is given, repeat the check for the number of seconds. If count is given, wait for this number of matches. Returns the number of matches.
Optionally set the id of the process that is writing to log file. When grepping it will not wait for more input if the process is dead. Returns the pid.
Alexander Bluhm <email@example.com>,
Copyright (c) 2020 Alexander Bluhm
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Thanks to genua GmbH, https://www.genua.de/ for sponsoring this work.