Developer Center

Creating Action Log and Module Log

To facilitate module development, WISECP has a built-in logging function that allows you to record requests and response strings for each call that the module makes, thus allowing you to debug/troubleshoot and review module calls.

To enable and browse log records, you can follow the "Tools > Module Log Records" path in the menu.

Creating Module Log

/**
* Save module log
*
* @param string $module_type The type of the module ex: Servers
* @param string $module The name of the module
* @param string $action The name of the action being performed
* @param string|array $request The input parameters for the API call
* @param string|array $response The response data from the API call
* @param string|array $processed The resulting data after any post processing (eg. json decode, xml decode, etc.)
*/
self::save_log($module_type,$module,$action,$request,$response,$processed);

Creating Action Log


/**
* Retrieve User ID:
* $u_data = UserManager::LoginData('member'); // 'member' : client, 'admin' : administrator
* $user_id = $u_data['id'];
* Save Action Log
* @param integer $user_id The ID of the client or administrator.
* @param string $type The type of action, ex: transaction
* @param string $description Description of the action
*/
User::addAction($user_id,$type,$description);
Defining Custom Function for Admin Area

Do you have any questions?

Feel free to contact us
Contact Us
Copyright © 2024. All Rights Reserved.
Join Our Discord Channel
Top

New Year's Special Discount

"Startup Lifetime" and "Professional Lifetime" licenses are 30% off!

Coupon Code:
HAPPYYEARS30 Copied!
Discount Rate 30%
Expiration Date December 31, 2024