You're most welcome.

Log::ger actually has more reverse dependencies on CPAN than Log::Any now.

% lcpan rdeps Log::ger | wc -l
253

% lcpan rdeps Log::Any | wc -l
196

but all those Log::ger reverse deps are mine :-) (haven't found my first vict, er, author yet), while Log::Any is used on CPAN by a whooping 77 different authors:

% lcpan rdeps Log::ger | td select author | sort | uniq
PERLANCAR

% lcpan rdeps Log::Any | td select author | sort | uniq | wc -l
77

I was a long-time Log::Any user before getting annoyed enough to write the replacement, so to tell you in short why I ditched Log::Any: it stopped being lightweight enough to use in some of my modules. Startup time increases by 5-10ms. And if you use Log::Any in your module, suddenly you will also depend on things like IO::File, FindBin, Storable, Sys::Syslog:

% lcpan deps --phase runtime --rel requires Log::Any
+----------------+----------+---------+---------+
| module         | author   | version | is_core |
+----------------+----------+---------+---------+
| B              | SHAY     | 0       | 1       |
| Carp           | XSAWYERX | 0       | 1       |
| Data::Dumper   | XSAWYERX | 0       | 1       |
| Exporter       | TODDR    | 0       | 1       |
| Fcntl          | SHAY     | 0       | 1       |
| File::Basename | SHAY     | 0       | 1       |
| FindBin        | SHAY     | 0       | 1       |
| IO::File       | TODDR    | 0       | 1       |
| Storable       | XSAWYERX | 0       | 1       |
| Sys::Syslog    | SAPER    | 0       | 1       |
| Test::Builder  | EXODIST  | 0       | 1       |
| constant       | RJBS     | 0       | 1       |
| strict         | SHAY     | 0       | 1       |
| warnings       | SHAY     | 0       | 1       |
+----------------+----------+---------+---------+

% lcpan deps --phase runtime --rel requires Log::ger
+--------------+----------+---------+---------+
| module       | author   | version | is_core |
+--------------+----------+---------+---------+
| Data::Dumper | XSAWYERX | 0       | 1       |
| parent       | CORION   | 0       | 1       |
| strict       | SHAY     | 0       | 1       |
| vars         | SHAY     | 0       | 1       |
| warnings     | SHAY     | 0       | 1       |
+--------------+----------+---------+---------+

Granted, all those modules are core, but this shows that Log::Any was not the tiny little module you can just sneak in to your module without much thought anymore, especially if you want your module to also be tiny.

I have made Log::ger to be as light as strict or warnings so the impact of adding use Log::ger; to your module is really minimal. And this is really important to me because I want to be able to use logging pervasively in most (if not all) of my modules when necessary.

Log::ger basically has all the features of Log::Any plus more, with less impact to your module users.

As for Log::Dispatch, it has even much worse startup overhead. It will add ~100ms to your module's startup by loading a whole argument parameter framework (Specio, Params::ValidationCompiler) as well as many extras like Module::Runtime, File::Spec, Storable, Exception::Class, List::Util, so that's not acceptable for some cases. It will pull many non-core dependencies to your module.


In reply to Re^3: Log::Any with die and carp by perlancar
in thread Log::Any with die and carp by learnedbyerror

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.