sul-dlss-deprecated / assembly

DEPRECATED: This repo has been merged into common-accessioning
Other
0 stars 1 forks source link

use Lybercore::Log object to access logger to fix erroring out robots #54

Closed peetucket closed 7 years ago

atz commented 7 years ago

Currently the calls to logger in Dor::Assembly::Item are throwing exception in production. While I'm for fixing that, it seems like a sprinkling a global everywhere is very much not the way to go.

peetucket commented 7 years ago

The alternative I had in a mind is a module that setups a logger to be used in the various classes, but that ROBOT_LOG global seems to be used by other robot suites, and perhaps robot master, so it probably needs to be setup that way for consistency (and perhaps for other reasons). So the benefit to the alternate approach is to at least limit the number of references of that global variable to a single location (while moderately increasing the complexity by introducing a new module to be mixed in).

drh-stanford commented 7 years ago

You should be able to use LyberCore::Log -- see https://github.com/sul-dlss/lyber-core/blob/master/lib/lyber_core/robot.rb#L63-L64

peetucket commented 7 years ago

Thanks @drh-stanford ... updated pull request to just use that object instead of the global