Skip to content

Commit

Permalink
Added or replaced meaningful label for eZDebug messages by jeromegamez (
Browse files Browse the repository at this point in the history
  • Loading branch information
pkamps committed Jun 8, 2020
1 parent 60bd929 commit 3749fe1
Show file tree
Hide file tree
Showing 88 changed files with 204 additions and 204 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ function setAttributes( $element, $attributes )
}
else
{
eZDebug::writeWarning( "No namespace defined for prefix '$prefix'.", 'eZXML input parser' );
eZDebug::writeWarning( "No namespace defined for prefix '$prefix'.", __METHOD__ );
}
}
else
Expand Down
2 changes: 1 addition & 1 deletion kernel/class/copy.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@

default:
{
eZDebug::writeWarning( "Invalid ClassRedirect value '$classRedirect', use one of: grouplist, classlist, classedit or classview" );
eZDebug::writeWarning( "Invalid ClassRedirect value '$classRedirect', use one of: grouplist, classlist, classedit or classview", __METHOD__ );
}

case 'classedit':
Expand Down
4 changes: 2 additions & 2 deletions kernel/classes/clusterfilehandlers/ezfsfilehandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function_exists( 'posix_kill' ) )
}
if ( !$mutex->steal() )
{
eZDebug::writeWarning( "Failed to steal lock for file " . $this->filePath . " from PID $oldPid" );
eZDebug::writeWarning( "Failed to steal lock for file " . $this->filePath . " from PID $oldPid", __METHOD__ );
return false;
}
$mutex->setMeta( 'pid', getmypid() );
Expand Down Expand Up @@ -499,7 +499,7 @@ function storeCache( $fileData, $storeCache = true )
if ( $binaryData === null &&
$fileContent === null )
{
eZDebug::writeError( "Write callback need to set the 'content' or 'binarydata' entry" );
eZDebug::writeError( "Write callback need to set the 'content' or 'binarydata' entry", __METHOD__ );
return null;
}

Expand Down
2 changes: 1 addition & 1 deletion kernel/classes/datatypes/ezauthor/ezauthortype.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ function customObjectAttributeHTTPAction( $http, $action, $contentObjectAttribut
}break;
default :
{
eZDebug::writeError( "Unknown custom HTTP action: " . $action, "eZAuthorType" );
eZDebug::writeError( "Unknown custom HTTP action: " . $action, __METHOD__ );
}break;
}
}
Expand Down
4 changes: 2 additions & 2 deletions kernel/classes/datatypes/ezbinaryfile/ezbinaryfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,12 @@ function metaData()
}
else
{
eZDebug::writeWarning( "Plugin for $this->MimeType was not found", 'eZBinaryFile' );
eZDebug::writeWarning( "Plugin for $this->MimeType was not found", __METHOD__ );
}
}
else
{
eZDebug::writeWarning( "Mimetype $this->MimeType not supported for indexing", 'eZBinaryFile' );
eZDebug::writeWarning( "Mimetype $this->MimeType not supported for indexing", __METHOD__ );
}

return $metaData;
Expand Down
2 changes: 1 addition & 1 deletion kernel/classes/datatypes/ezfloat/ezfloattype.php
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ function validateClassAttributeHTTPInput( $http, $base, $classAttribute )
else
{
$state = eZInputValidator::STATE_INTERMEDIATE;
eZDebug::writeNotice( "Integer minimum value great than maximum value." );
eZDebug::writeNotice( "Integer minimum value greater than maximum value.", __METHOD__ );
return $state;
}
}
Expand Down
2 changes: 1 addition & 1 deletion kernel/classes/datatypes/ezinteger/ezintegertype.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ function validateClassAttributeHTTPInput( $http, $base, $classAttribute )
else
{
$state = eZInputValidator::STATE_INTERMEDIATE;
eZDebug::writeNotice( "Integer minimum value great than maximum value." );
eZDebug::writeNotice( "Integer minimum value greater than maximum value.", __METHOD__ );
return $state;
}
}
Expand Down
6 changes: 3 additions & 3 deletions kernel/classes/datatypes/ezmatrix/ezmatrixtype.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ function customObjectAttributeHTTPAction( $http, $action, $contentObjectAttribut
}break;
default :
{
eZDebug::writeError( 'Unknown custom HTTP action: ' . $action, 'eZMatrixType' );
eZDebug::writeError( 'Unknown custom HTTP action: ' . $action, __METHOD__ );
}break;
}
}
Expand Down Expand Up @@ -372,7 +372,7 @@ function customClassAttributeHTTPAction( $http, $action, $contentClassAttribute
}break;
default :
{
eZDebug::writeError( 'Unknown custom HTTP action: ' . $action, 'eZEnumType' );
eZDebug::writeError( 'Unknown custom HTTP action: ' . $action, __METHOD__ );
}break;
}
}
Expand Down Expand Up @@ -410,7 +410,7 @@ function fromString( $contentObjectAttribute, $string )

if ( $string != '' )
{
$matrixRowsList = eZStringUtils::explodeStr( $string, "&" );
$matrixRowsList = eZStringUtils::explodeStr( $string, "&" );

foreach( $matrixRowsList as $key => $value )
{
Expand Down
2 changes: 1 addition & 1 deletion kernel/classes/datatypes/ezmedia/ezmediatype.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ function fetchObjectAttributeHTTPInput( $http, $base, $contentObjectAttribute )
}

$orig_dir = $mediaFile->storageDir( "original" );
eZDebug::writeNotice( "dir=$orig_dir" );
eZDebug::writeNotice( "dir=$orig_dir", __METHOD__ );
$media->setAttribute( "filename", basename( $mediaFile->attribute( "filename" ) ) );
$media->setAttribute( "original_filename", $mediaFile->attribute( "original_filename" ) );
$media->setAttribute( "mime_type", $mime );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ function customObjectAttributeHTTPAction( $http, $action, $contentObjectAttribut

default:
{
eZDebug::writeError( "Unknown custom HTTP action: " . $action, "eZMultiOptionType" );
eZDebug::writeError( "Unknown custom HTTP action: " . $action, __METHOD__ );
} break;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ function customObjectAttributeHTTPAction( $http, $action, $contentObjectAttribut
}
else
{
eZDebug::writeError( "Unknown custom HTTP action: " . $action, "eZMultiOptionType" );
eZDebug::writeError( "Unknown custom HTTP action: " . $action, __METHOD__ );
}
}

Expand Down
2 changes: 1 addition & 1 deletion kernel/classes/datatypes/ezmultiprice/ezmultipricetype.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ function customObjectAttributeHTTPAction( $http, $action, $contentObjectAttribut

default :
{
eZDebug::writeError( 'Unknown custom HTTP action: ' . $action, 'eZMultiPriceType' );
eZDebug::writeError( 'Unknown custom HTTP action: ' . $action, __METHOD__ );
}break;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ function customObjectAttributeHTTPAction( $http, $action, $contentObjectAttribut

default :
{
eZDebug::writeError( "Unknown custom HTTP action: " . $action, "eZObjectRelationType" );
eZDebug::writeError( "Unknown custom HTTP action: " . $action, __METHOD__ );
} break;
}
}
Expand Down Expand Up @@ -726,7 +726,7 @@ function serializeContentObjectAttribute( $package, $objectAttribute )
$relatedObject = eZContentObject::fetch( $relatedObjectID );
if ( !$relatedObject )
{
eZDebug::writeNotice( 'Related object with ID: ' . $relatedObjectID . ' does not exist.' );
eZDebug::writeNotice( 'Related object with ID: ' . $relatedObjectID . ' does not exist.', __METHOD__ );
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1150,7 +1150,7 @@ function customObjectAttributeHTTPAction( $http, $action, $contentObjectAttribut
else
{
eZDebug::writeError( "Unknown custom HTTP action: " . $action,
'eZObjectRelationListType' );
__METHOD__ );
}
}

Expand Down Expand Up @@ -1666,7 +1666,7 @@ function fromString( $contentObjectAttribute, $string )
}
else
{
eZDebug::writeWarning( $objectID, "Can not create relation because object is missing" );
eZDebug::writeWarning( "Can not create relation because object {$objectID} is missing", __METHOD__ );
}
}
$contentObjectAttribute->setContent( $content );
Expand Down Expand Up @@ -1838,7 +1838,7 @@ function serializeContentObjectAttribute( $package, $objectAttribute )
$success = $relationItem->removeAttribute( $attribute->localName );
if ( !$success )
{
eZDebug::writeError( 'failed removing attribute ' . $attrName . ' from relation-item element' );
eZDebug::writeError( 'failed removing attribute ' . $attrName . ' from relation-item element', __METHOD__ );
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion kernel/classes/datatypes/ezoption/ezoptiontype.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ function customObjectAttributeHTTPAction( $http, $action, $contentObjectAttribut
}break;
default :
{
eZDebug::writeError( "Unknown custom HTTP action: " . $action, "eZOptionType" );
eZDebug::writeError( "Unknown custom HTTP action: " . $action, __METHOD__ );
}break;
}
}
Expand Down
8 changes: 4 additions & 4 deletions kernel/classes/datatypes/ezuser/ezuser.php
Original file line number Diff line number Diff line change
Expand Up @@ -1258,13 +1258,13 @@ static function instance( $id = false )
if ( !$currentUser )
{
$currentUser = eZUser::fetch( self::anonymousId() );
eZDebug::writeWarning( 'User not found, returning anonymous' );
eZDebug::writeWarning( 'User not found, returning anonymous', __METHOD__ );
}

if ( !$currentUser )
{
$currentUser = new eZUser( array( 'id' => -1, 'login' => 'NoUser' ) );
eZDebug::writeWarning( 'Anonymous user not found, returning NoUser' );
eZDebug::writeWarning( 'Anonymous user not found, returning NoUser', __METHOD__ );
}

$GLOBALS["eZUserGlobalInstance_$id"] = $currentUser;
Expand Down Expand Up @@ -2392,14 +2392,14 @@ function hasAccessToView( $module, $viewName, &$params )
if ( !empty( $buffer ) or $ret === false )
{
eZDebug::writeError( "There was an error while evaluating the policy functions value of the '$moduleName/$viewName' view. " .
"Please check the '$moduleName/module.php' file." );
"Please check the '$moduleName/module.php' file.", __METHOD__ );
$accessAllowed = false;
}
}
else
{
eZDebug::writeError( "There is a mistake in the functions array data of the '$moduleName/$viewName' view. " .
"Please check the '$moduleName/module.php' file." );
"Please check the '$moduleName/module.php' file.", __METHOD__ );
$accessAllowed = false;
}
}
Expand Down
6 changes: 3 additions & 3 deletions kernel/classes/datatypes/ezxmltext/ezxmlinputparser.php
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ function setAttributes( $element, $attributes )
}
else
{
eZDebug::writeWarning( "No namespace defined for prefix '$prefix'.", 'eZXML input parser' );
eZDebug::writeWarning( "No namespace defined for prefix '$prefix'.", __METHOD__ );
}
}
else
Expand Down Expand Up @@ -1205,7 +1205,7 @@ function callInputHandler( $handlerName, $tagName, &$attributes )
}
else
{
eZDebug::writeWarning( "'$handlerName' input handler for tag <$tagName> doesn't exist: '" . $thisInputTag[$handlerName] . "'.", 'eZXML input parser' );
eZDebug::writeWarning( "'$handlerName' input handler for tag <$tagName> doesn't exist: '" . $thisInputTag[$handlerName] . "'.", __METHOD__ );
}
}
return $result;
Expand All @@ -1224,7 +1224,7 @@ function callOutputHandler( $handlerName, $element, &$params )
}
else
{
eZDebug::writeWarning( "'$handlerName' output handler for tag <$element->nodeName> doesn't exist: '" . $thisOutputTag[$handlerName] . "'.", 'eZXML input parser' );
eZDebug::writeWarning( "'$handlerName' output handler for tag <$element->nodeName> doesn't exist: '" . $thisOutputTag[$handlerName] . "'.", __METHOD__ );
}
}

Expand Down
4 changes: 2 additions & 2 deletions kernel/classes/datatypes/ezxmltext/ezxmloutputhandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ function outputTag( $element, &$siblingParams, $parentParams = array() )
$classesList = $this->XMLSchema->getClassesList( $tagName );
if ( !in_array( $attrNode->value, $classesList ) )
{
eZDebug::writeWarning( "Using tag '$tagName' with class '$attrNode->value' is not allowed.", 'XML output handler' );
eZDebug::writeWarning( "Using tag '$tagName' with class '$attrNode->value' is not allowed.", __METHOD__ );
return array( true, '' );
}
}
Expand Down Expand Up @@ -641,7 +641,7 @@ function callTagRenderHandler( $handlerName, $element, $childrenOutput, $vars )
}
else
{
eZDebug::writeWarning( "'$handlerName' render handler for tag <$element->nodeName> doesn't exist: '" . $thisOutputTag[$handlerName] . "'.", 'eZXML converter' );
eZDebug::writeWarning( "'$handlerName' render handler for tag <$element->nodeName> doesn't exist: '" . $thisOutputTag[$handlerName] . "'.", __METHOD__ );
}
return $result;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ function callOutputHandler( $handlerName, $element, &$params, &$sectionLevel )
}
else
{
eZDebug::writeWarning( "'$handlerName' output handler for tag <$element->nodeName> doesn't exist: '" . $thisOutputTag[$handlerName] . "'.", 'eZXML converter' );
eZDebug::writeWarning( "'$handlerName' output handler for tag <$element->nodeName> doesn't exist: '" . $thisOutputTag[$handlerName] . "'.", __METHOD__ );
}
}
return $result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ function initHandlerLink( $element, &$attributes, &$siblingParams, &$parentParam
}
else
{
eZDebug::writeWarning( "Node #$nodeID doesn't exist", "XML output handler: link" );
eZDebug::writeWarning( "Node #$nodeID doesn't exist", __METHOD__ );
}
}
elseif ( $element->getAttribute( 'object_id' ) != null )
Expand Down Expand Up @@ -248,12 +248,12 @@ function initHandlerLink( $element, &$attributes, &$siblingParams, &$parentParam
}
else
{
eZDebug::writeWarning( "Object #$objectID doesn't have assigned nodes", "XML output handler: link" );
eZDebug::writeWarning( "Object #$objectID doesn't have assigned nodes", __METHOD__ );
}
}
else
{
eZDebug::writeWarning( "Object #$objectID doesn't exist", "XML output handler: link" );
eZDebug::writeWarning( "Object #$objectID doesn't exist", __METHOD__ );
}
}
elseif ( $element->getAttribute( 'href' ) != null )
Expand Down Expand Up @@ -301,20 +301,20 @@ function initHandlerEmbed( $element, &$attributes, &$siblingParams, &$parentPara
}
else
{
eZDebug::writeWarning( "Node #$nodeID doesn't exist", "XML output handler: embed" );
eZDebug::writeWarning( "Node #$nodeID doesn't exist", __METHOD__ );
return $ret;
}
}
}

if ( !isset( $object ) || !$object || !( $object instanceof eZContentObject ) )
{
eZDebug::writeWarning( "Can't fetch object #$objectID", "XML output handler: embed" );
eZDebug::writeWarning( "Can't fetch object #$objectID", __METHOD__ );
return $ret;
}
if ( $object->attribute( 'status' ) != eZContentObject::STATUS_PUBLISHED )
{
eZDebug::writeWarning( "Object #$objectID is not published", "XML output handler: embed" );
eZDebug::writeWarning( "Object #$objectID is not published", __METHOD__ );
return $ret;
}

Expand All @@ -325,7 +325,7 @@ function initHandlerEmbed( $element, &$attributes, &$siblingParams, &$parentPara
// embed with a node ID
if ( $node->attribute( 'is_invisible' ) )
{
eZDebug::writeNotice( "Node #{$nodeID} is invisible", "XML output handler: embed" );
eZDebug::writeNotice( "Node #{$nodeID} is invisible", __METHOD__ );
return $ret;
}
}
Expand Down
8 changes: 4 additions & 4 deletions kernel/classes/ezcontentobjectassignmenthandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,13 @@ function setupAssignments( $parameters )
if ( isset( $assignmentRules[1] ) )
$mainID = $assignmentRules[1];
}
eZDebug::writeDebug( $assignments, 'assignments' );
eZDebug::writeDebug( $assignments, __METHOD__ );
if ( $assignments )
{
if ( $mainID )
$mainID = $this->nodeID( $mainID );
$nodeList = $this->nodeIDList( $assignments );
eZDebug::writeDebug( $nodeList, 'nodeList' );
eZDebug::writeDebug( $nodeList, __METHOD__ );
$assignmentCount = 0;
eZDebug::writeDebug( $this->CurrentObject->attribute( 'id' ), 'current object' );
eZDebug::writeDebug( $this->CurrentVersion->attribute( 'version' ), 'current version' );
Expand All @@ -165,12 +165,12 @@ function setupAssignments( $parameters )
continue;
$parentContentObject = $node->attribute( 'object' );

eZDebug::writeDebug( "Checking for '$nodeID'" );
eZDebug::writeDebug( "Checking for '$nodeID'", __METHOD__ );
if ( $parentContentObject->checkAccess( 'create',
$contentClassID,
$parentContentObject->attribute( 'contentclass_id' ) ) == '1' )
{
eZDebug::writeDebug( "Adding to '$nodeID' and main = '$mainID'" );
eZDebug::writeDebug( "Adding to '$nodeID' and main = '$mainID'", __METHOD__ );
if ( $mainID === false )
{
$isMain = ( $assignmentCount == 0 );
Expand Down
Loading

0 comments on commit 3749fe1

Please sign in to comment.