Function __global->log_it
Definitions
sources/global3.php
- Log an action.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: int
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $type | ID_TEXT | No | No | required parameter | N/A | N/A | The type of activity just carried out (a language string codename) |
| $a | ?SHORT_TEXT | No | No | Null | N/A | N/A | The most important parameter of the activity (e.g. D) (null: none) |
| $b | ?SHORT_TEXT | No | No | Null | N/A | N/A | A secondary (perhaps, human readable) parameter of the activity (e.g. caption) (null: none) |
| $return_id | boolean | No | No | False | N/A | N/A | Whether to return an ID to the log entry (forces immediate logging, rather than at script end) |
Returns
- Log ID (null: did not save a log)
- Type: ?AUTO_LINK
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Log an action.
*
* @param ID_TEXT $type The type of activity just carried out (a language string codename)
* @param ?SHORT_TEXT $a The most important parameter of the activity (e.g. D) (null: none)
* @param ?SHORT_TEXT $b A secondary (perhaps, human readable) parameter of the activity (e.g. caption) (null: none)
* @param boolean $return_id Whether to return an ID to the log entry (forces immediate logging, rather than at script end)
* @return ?AUTO_LINK Log ID (null: did not save a log)
*/
function log_it(string $type, ?string $a = null, ?string $b = null, bool $return_id = false) : ?int
* Log an action.
*
* @param ID_TEXT $type The type of activity just carried out (a language string codename)
* @param ?SHORT_TEXT $a The most important parameter of the activity (e.g. D) (null: none)
* @param ?SHORT_TEXT $b A secondary (perhaps, human readable) parameter of the activity (e.g. caption) (null: none)
* @param boolean $return_id Whether to return an ID to the log entry (forces immediate logging, rather than at script end)
* @return ?AUTO_LINK Log ID (null: did not save a log)
*/
function log_it(string $type, ?string $a = null, ?string $b = null, bool $return_id = false) : ?int

