mirror of
https://github.com/friendica/friendica
synced 2025-04-27 21:50:11 +00:00
Use a process identifier for logging that contains the pid (#5359)
This commit is contained in:
parent
ef0e34adf3
commit
3792e2819d
3 changed files with 15 additions and 3 deletions
|
@ -203,6 +203,18 @@ EOT;
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a process identifier for the logging
|
||||
*
|
||||
* @param string $prefix A given prefix
|
||||
*
|
||||
* @return string a generated process identifier
|
||||
*/
|
||||
public static function processID($prefix)
|
||||
{
|
||||
return uniqid($prefix . ':' . str_pad(getmypid() . ':', 8, '0') . ':');
|
||||
}
|
||||
|
||||
/// @todo Move the following functions from boot.php
|
||||
/*
|
||||
function killme()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue