Skip to content

Commit 6a9caae

Browse files
committed
lots of updates to myadmin_log calls adding the optional module and service id parameters in applicable places
1 parent d4da098 commit 6a9caae

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

src/Plugin.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ public static function getActivate(GenericEvent $event)
7676
{
7777
$serviceClass = $event->getSubject();
7878
if ($event['category'] == get_service_define('CLOUDLINUX')) {
79-
myadmin_log(self::$module, 'info', 'Cloudlinux Activation', __LINE__, __FILE__);
79+
myadmin_log(self::$module, 'info', 'Cloudlinux Activation', __LINE__, __FILE__, self::$module, $serviceClass->getId());
8080
$cl = new Cloudlinux(CLOUDLINUX_LOGIN, CLOUDLINUX_KEY);
8181
$response = $cl->isLicensed($serviceClass->getIp(), true);
82-
myadmin_log(self::$module, 'info', 'Response: '.json_encode($response), __LINE__, __FILE__);
82+
myadmin_log(self::$module, 'info', 'Response: '.json_encode($response), __LINE__, __FILE__, self::$module, $serviceClass->getId());
8383
if (!is_array($response) || !in_array($event['field1'], array_values($response))) {
8484
$response = $cl->license($serviceClass->getIp(), $event['field1']);
8585
//$serviceExtra = $response['mainKeyNumber'].','.$response['productKey'];
8686
request_log(self::$module, $GLOBALS['tf']->session->account_id, __FUNCTION__, 'cloudlinux', 'license', [$serviceClass->getIp(), $event['field1']], $response);
87-
myadmin_log(self::$module, 'info', 'Response: '.json_encode($response), __LINE__, __FILE__);
87+
myadmin_log(self::$module, 'info', 'Response: '.json_encode($response), __LINE__, __FILE__, self::$module, $serviceClass->getId());
8888
if ($response === false) {
8989
$event['status'] = 'error';
9090
$event['status_text'] = 'Error Licensing the new IP.';
@@ -107,7 +107,7 @@ public static function getDeactivate(GenericEvent $event)
107107
{
108108
$serviceClass = $event->getSubject();
109109
if ($event['category'] == get_service_define('CLOUDLINUX')) {
110-
myadmin_log(self::$module, 'info', 'Cloudlinux Deactivation', __LINE__, __FILE__);
110+
myadmin_log(self::$module, 'info', 'Cloudlinux Deactivation', __LINE__, __FILE__, self::$module, $serviceClass->getId());
111111
function_requirements('deactivate_cloudlinux');
112112
deactivate_cloudlinux($serviceClass->getIp(), $event['field1']);
113113
$event->stopPropagation();
@@ -121,7 +121,7 @@ public static function getDeactivateIp(GenericEvent $event)
121121
{
122122
$serviceClass = $event->getSubject();
123123
if ($event['category'] == get_service_define('CLOUDLINUX')) {
124-
myadmin_log(self::$module, 'info', 'Cloudlinux Deactivation', __LINE__, __FILE__);
124+
myadmin_log(self::$module, 'info', 'Cloudlinux Deactivation', __LINE__, __FILE__, self::$module, $serviceClass->getId());
125125
function_requirements('deactivate_cloudlinux');
126126
deactivate_cloudlinux($serviceClass->getIp());
127127
$event->stopPropagation();
@@ -137,18 +137,18 @@ public static function getChangeIp(GenericEvent $event)
137137
if ($event['category'] == get_service_define('CLOUDLINUX')) {
138138
$serviceClass = $event->getSubject();
139139
$settings = get_module_settings(self::$module);
140-
myadmin_log(self::$module, 'info', 'IP Change - OLD:'.$serviceClass->getIp()." NEW:{$event['newip']} Type:{$event['field1']}", __LINE__, __FILE__);
140+
myadmin_log(self::$module, 'info', 'IP Change - OLD:'.$serviceClass->getIp()." NEW:{$event['newip']} Type:{$event['field1']}", __LINE__, __FILE__, self::$module, $serviceClass->getId());
141141
$cl = new Cloudlinux(CLOUDLINUX_LOGIN, CLOUDLINUX_KEY);
142142
$response = $cl->remove($serviceClass->getIp(), $event['field1']);
143-
myadmin_log(self::$module, 'info', 'Response: '.json_encode($response), __LINE__, __FILE__);
143+
myadmin_log(self::$module, 'info', 'Response: '.json_encode($response), __LINE__, __FILE__, self::$module, $serviceClass->getId());
144144
$event['status'] = 'ok';
145145
$event['status_text'] = 'The IP Address has been changed.';
146146
if ($response === false) {
147147
$event['status'] = 'error';
148148
$event['status_text'] = 'Error removing the old license.';
149149
} else {
150150
$response = $cl->isLicensed($event['newip'], true);
151-
myadmin_log(self::$module, 'info', 'Response: '.json_encode($response), __LINE__, __FILE__);
151+
myadmin_log(self::$module, 'info', 'Response: '.json_encode($response), __LINE__, __FILE__, self::$module, $serviceClass->getId());
152152
if (!is_array($response) || !in_array($event['field1'], array_values($response))) {
153153
$response = $cl->license($event['newip'], $event['field1']);
154154
//$serviceExtra = $response['mainKeyNumber'].','.$response['productKey'];

0 commit comments

Comments
 (0)