projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
we have a initial working loging in version. Doesn't do much, but its
[spider.git]
/
perl
/
DXChannel.pm
diff --git
a/perl/DXChannel.pm
b/perl/DXChannel.pm
index 6a867bb95185896d9c726ba4e15c3e99577a6b01..b661510040eebe5954bf7063b24169a2a435fa5c 100644
(file)
--- a/
perl/DXChannel.pm
+++ b/
perl/DXChannel.pm
@@
-11,6
+11,7
@@
require Exporter;
@ISA = qw(Exporter);
use Msg;
@ISA = qw(Exporter);
use Msg;
+use DXUtil;
%connects = undef;
%connects = undef;
@@
-20,7
+21,7
@@
sub new
my ($pkg, $call, $conn, $user) = @_;
my $self = {};
my ($pkg, $call, $conn, $user) = @_;
my $self = {};
- die "trying to create a duplicate
Connect for call $call\n
" if $connects{$call};
+ die "trying to create a duplicate
channel for $call
" if $connects{$call};
$self->{call} = $call;
$self->{conn} = $conn;
$self->{user} = $user;
$self->{call} = $call;
$self->{conn} = $conn;
$self->{user} = $user;
@@
-74,7
+75,9
@@
sub send_now
my $line;
foreach $line (@_) {
my $line;
foreach $line (@_) {
- print DEBUG "$t > $sort $call $line\n" if defined DEBUG;
+ my $t = atime;
+ chomp $line;
+ print main::DEBUG "$t > $sort $call $line\n" if defined DEBUG;
print "> $sort $call $line\n";
$conn->send_now("$sort$call|$line");
}
print "> $sort $call $line\n";
$conn->send_now("$sort$call|$line");
}
@@
-89,7
+92,9
@@
sub send_later
my $line;
foreach $line (@_) {
my $line;
foreach $line (@_) {
- print DEBUG "$t > $sort $call $line\n" if defined DEBUG;
+ my $t = atime;
+ chomp $line;
+ print main::DEBUG "$t > $sort $call $line\n" if defined DEBUG;
print "> $sort $call $line\n";
$conn->send_later("$sort$call|$line");
}
print "> $sort $call $line\n";
$conn->send_later("$sort$call|$line");
}