projects
/
virtual-ldap
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a793e6c
)
added log file
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Mon, 16 Mar 2009 18:11:12 +0000
(18:11 +0000)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Mon, 16 Mar 2009 18:11:12 +0000
(18:11 +0000)
bin/ldap-rewrite.pl
patch
|
blob
|
history
diff --git
a/bin/ldap-rewrite.pl
b/bin/ldap-rewrite.pl
index
23e790b
..
a6eff6e
100755
(executable)
--- a/
bin/ldap-rewrite.pl
+++ b/
bin/ldap-rewrite.pl
@@
-24,9
+24,23
@@
my $config = {
upstream_ldap => 'ldap.ffzg.hr',
upstream_ssl => 1,
overlay_prefix => 'ffzg-',
upstream_ldap => 'ldap.ffzg.hr',
upstream_ssl => 1,
overlay_prefix => 'ffzg-',
+ log_file => 'log',
};
};
+my $log_fh;
+
+sub log {
+ open($log_fh, '>', $config->{log_file}) || die "can't open ", $config->{log_file},": $!";
+ $log_fh->autoflush(1);
+ print $log_fh join("\n", @_),"\n";
+}
+
+BEGIN {
+ $SIG{'__WARN__'} = sub { warn @_; main::log(@_); }
+}
+
+
if ( ! -d $config->{yaml_dir} ) {
warn "DISABLE ", $config->{yaml_dir}," data overlay";
}
if ( ! -d $config->{yaml_dir} ) {
warn "DISABLE ", $config->{yaml_dir}," data overlay";
}