Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates logging labels in the WHMCS email_solution server module and performs a minor whitespace cleanup.
Changes:
- Renames
logModuleCall“module” labels inhooks.phpfromEmail AccounttoMailCow Email Account. - Minor formatting/whitespace adjustment in
email_solution.php.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
email_solution/whmcs/modules/servers/email_solution/hooks.php |
Updates logModuleCall identifiers and adjusts formatting in one catch block. |
email_solution/whmcs/modules/servers/email_solution/email_solution.php |
Removes an extra blank line at the top of the file. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // assignConfigOption($vars['pid'], $groupID, 1); | ||
| // } | ||
| logModuleCall('Email Account',__FUNCTION__,$vars,'',['status'=>'successfully save changes ']); | ||
| logModuleCall('MailCow Email Account', __FUNCTION__, $vars, '', ['status' => 'successfully save changes ']); |
There was a problem hiding this comment.
The log message has a trailing space and ungrammatical phrasing. Consider changing it to a correctly worded, trimmed string (e.g., "successfully saved changes") so logs are consistent and easier to search.
| logModuleCall('MailCow Email Account', __FUNCTION__, $vars, '', ['status' => 'successfully save changes ']); | |
| logModuleCall('MailCow Email Account', __FUNCTION__, $vars, '', ['status' => 'successfully saved changes']); |
| // assignConfigOption($vars['pid'], $groupID, 1); | ||
| // } | ||
| logModuleCall('Email Account',__FUNCTION__,$vars,'',['status'=>'successfully save changes ']); | ||
| logModuleCall('MailCow Email Account', __FUNCTION__, $vars, '', ['status' => 'successfully save changes ']); |
There was a problem hiding this comment.
The first argument to logModuleCall is now "MailCow Email Account", but the rest of this module logs under "Email Solution" (e.g., email_solution.php:86,338,626,882). Using a different module name will split log entries across categories and make troubleshooting harder; consider standardizing this value across the module (and update the other occurrences in this file too).
| } | ||
| } catch (Exception $e) { | ||
| logModuleCall('Email Account',__FUNCTION__,'',$e->getMessage(),['error'=>$e->getMessage()]); | ||
| logModuleCall('MailCow Email Account', __FUNCTION__, '', $e->getMessage(), ['error' => $e->getMessage()]); |
There was a problem hiding this comment.
Indentation in this catch block is inconsistent with the rest of the file (the logModuleCall line is not indented under the catch). Please align indentation to improve readability and avoid accidental diff noise in future edits.
| logModuleCall('MailCow Email Account', __FUNCTION__, '', $e->getMessage(), ['error' => $e->getMessage()]); | |
| logModuleCall('MailCow Email Account', __FUNCTION__, '', $e->getMessage(), ['error' => $e->getMessage()]); |
No description provided.