protected function resolveTypeIdByOwner()
    {
        try {
            if (method_exists($this, 'getLogTypeId')) {
                return self::getLogTypeId();
            }

            $module     = $this->getLoggerModuleNameForType();
            $type       = LogTypes::where('name', $module)->first();
            
            if (is_null($type)) {
                $type = new LogTypes(['name' => $module]);
                $type->save();
            }
            return $type->id;
        } catch (Exception $ex) {
            Log::emergency($ex);
        }
    }