SYNOPSIS

     use Log::Any::IfLOG '$log';

DESCRIPTION

    This module will load Log::Any only when LOG environment variable is
    true (or TRACE, or DEBUG, or VERBOSE, or QUIET, or LOG_LEVEL; these
    variables are used by Perinci::CmdLine). Otherwise, the module is not
    loaded and if user imports $log, a dumb object will be returned instead
    that will accept any method but return false.

    This is a quick-hack solution to avoid the cost of loading Log::Any
    under "normal condition" (when log-enabling variables/flags are not set
    to true). Since Log::Any 1.00, startup overhead increases to about 7ms
    on my PC (from under 1ms for the previous version). Since I want to
    keep startup overhead of CLI apps under 50ms (see
    Perinci::CmdLine::Lite) to keep tab completion from getting a
    noticeable lag, every millisecond counts.

ENVIRONMENT

 LOG => bool

    If set to true, will load Log::Any as usual. Otherwise, won't load
    Log::Any and will return a dumb object in $log instead.

 TRACE => bool

 DEBUG => bool

 VERBOSE => bool

 QUIET => bool

 LOG_LEVEL => str

    These variables are used by Perinci::CmdLine as a shortcut to set log
    level. The setting of these variables indicate that user wants to see
    some logging, so Log::Any will be loaded under the presence of these
    variables.

SEE ALSO

    Log::Any

    http://github.com/dagolden/Log-Any/issues/24

