[Q] what is the right way to log what script does?

4 views
Skip to first unread message

Zeus Panchenko

unread,
Jan 19, 2018, 9:45:04 AM1/19/18
to perl...@perl.org
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hi,

I need to know what script did ...

what is the best way to log script all LDAP related activity?

is it something like?

sub each_ldap_related_anything {
...
use Storable;
store \%all_things_to_log, 'file';
...
}

- --
Zeus V. Panchenko jid:ze...@im.ibs.dn.ua
IT Dpt., I.B.S. LLC GMT+2 (EET)
-----BEGIN PGP SIGNATURE-----

iEYEARECAAYFAlpiABQACgkQr3jpPg/3oyoVAACghr0xx0ny13u3CNz9SqduHded
qFkAoOQ3wM05SYltaR88x6taHAwyM70Z
=uHoO
-----END PGP SIGNATURE-----

Chris Ridd

unread,
Jan 19, 2018, 4:15:02 PM1/19/18
to Zeus Panchenko, perl...@perl.org

> On 19 Jan 2018, at 14:26, Zeus Panchenko <ze...@ibs.dn.ua> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> hi,
>
> I need to know what script did ...
>
> what is the best way to log script all LDAP related activity?
>
> is it something like?
>
> sub each_ldap_related_anything {
> ...
> use Storable;
> store \%all_things_to_log, 'file';
> …
> }

Well it depends on what sort of output you wanted, and how much work you wanted to do.

The built-in debugging might work, which is called automatically on all sends and receives. You get a choice of hex dumps or BER (or both!), so it is pretty low-level and hardcore.

Look for the debug method in the docs.

Chris
Reply all
Reply to author
Forward
0 new messages