Make logging friendlier when not connecting to OpenSRF

Bug #1904233 reported by Bill Erickson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenSRF
New
Wishlist
Unassigned

Bug Description

OpenSRF 3.2.1

In some scenarios, it's useful for Perl clients to use OpenSRF (or Evergreen) code libraries that make use of the $logger without actually connecting to the OpenSRF network. Without the connection, the logger cannot initialize its configuration and defaults to logging to stderr, preceded by warnings about lack of config.

I propose a way for clients to set the loglevel and to specify logs should be delivered to STDOUT instead of STDERR when no configuration is available.

$logger->set_log_stdout(1);
$logger->set_log_level($logger->INFO);

Tags: pullrequest
Revision history for this message
Bill Erickson (berick) wrote :
tags: added: pullrequest
Changed in opensrf:
assignee: Bill Erickson (berick) → nobody
milestone: none → 3.2.2
Galen Charlton (gmc)
Changed in opensrf:
milestone: 3.2.2 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.