mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-29 22:55:52 +08:00
bug fixed
This commit is contained in:
parent
fa6eedc46a
commit
cea02a5b74
@ -132,16 +132,16 @@ API_EXPORT void API_CALL log_setLevel(LogType level){
|
|||||||
class LogoutChannel: public LogChannel {
|
class LogoutChannel: public LogChannel {
|
||||||
public:
|
public:
|
||||||
LogoutChannel(const string &name, onLogOut cb, LogLevel level = LDebug)
|
LogoutChannel(const string &name, onLogOut cb, LogLevel level = LDebug)
|
||||||
:LogChannel(name, level, "%Y-%m-%d %H:%M:%S"){
|
:LogChannel(name, level){
|
||||||
_cb = cb;
|
_cb = cb;
|
||||||
}
|
}
|
||||||
virtual ~LogoutChannel(){}
|
virtual ~LogoutChannel(){}
|
||||||
void write(const LogInfo_ptr &logInfo){
|
void write(const LogInfo_ptr &logInfo){
|
||||||
if (level() > logInfo->getLevel()) {
|
if (level() > logInfo->_level) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
stringstream strStream;
|
stringstream strStream;
|
||||||
logInfo->format(strStream, timeFormat().data(), false);
|
logInfo->format(strStream, false);
|
||||||
auto strTmp = strStream.str();
|
auto strTmp = strStream.str();
|
||||||
if (_cb) {
|
if (_cb) {
|
||||||
_cb(strTmp.data(), strTmp.size());
|
_cb(strTmp.data(), strTmp.size());
|
||||||
|
Loading…
Reference in New Issue
Block a user