Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/Log/Any/Manager.pm
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ sub get_adapter {
# Create a new adapter for this category if it is not already in cache
#
my $category_cache = $self->{category_cache};
if ( !defined( $category_cache->{$category} ) ) {

# The order in which objects are destroyed during the global destruction
# before the program exits is unpredictable.
# {adapter} is an object, so already at this point it can be undef!
if ( !defined( $category_cache->{$category} ) || !defined( $category_cache->{$category}->{adapter} )) {
my $entry = $self->_choose_entry_for_category($category);
my $adapter = $self->_new_adapter_for_entry( $entry, $category );
$category_cache->{$category} = { entry => $entry, adapter => $adapter };
Expand Down