unix - multiple using openlog php
I use logging in my project, at first, then I initialize some object, I use openlog function with specific ident, and then use syslog to write all I need. But I have one problem, there are some external requests inside objects, and I wanna change ident for them, so I try to do something like:
openlog($ident, LOG_PID, LOG_USER); syslog(LOG_DEBUG, $data); .... // external request in other place, where $ident is not available openlog($newIdent, LOG_PID, LOG_USER); syslog(LOG_DEBUG, $data); closelog(); // here I wanna change openlog to initial value openlog(?, LOG_PID, LOG_USER);
So how can I get first openlog ident, or Is it another method to do the same thing?