複数のアウトバウンドIPアドレスを使用するPerlコードがthreads
あります>>HTTP::Async
use threads ( 'yield',
'exit' => 'threads_only',
'stack_size' => 2*16384 );
use strict;
use warnings;
no warnings 'threads';
use threads::shared;
use LWP::UserAgent;
use HTTP::Request;
use HTTP::Async;
...
my $async = HTTP::Async->new( ... );
...
foreach (@list) {
$thread = threads->create( sub {
local $SIG{KILL} = sub { threads->exit };
...
$ua->local_address($ip);
$request->url($url);
$async->add($request);
while ($response = $async->wait_for_next_response) {
...
}
}, $_);
}
...
URLとアウトバウンドIP情報を含むいくつかの基本的なアプリケーションログを生成する必要があります。
どうすればHTTP::Async
通信をログに記録できますか?