mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Log: Refine the log interface. v5.0.82
This commit is contained in:
parent
252851d1b0
commit
e9915c3bd7
10 changed files with 91 additions and 277 deletions
|
@ -6,6 +6,18 @@
|
|||
|
||||
#include <srs_kernel_log.hpp>
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
const char* srs_log_level_strings[] = {
|
||||
"Forbidden",
|
||||
"Verb",
|
||||
"Debug", NULL,
|
||||
"Trace", NULL, NULL, NULL,
|
||||
"Warn", NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
"Error", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
"Disabled",
|
||||
};
|
||||
|
||||
ISrsLog::ISrsLog()
|
||||
{
|
||||
}
|
||||
|
@ -22,4 +34,15 @@ ISrsContext::~ISrsContext()
|
|||
{
|
||||
}
|
||||
|
||||
void srs_logger_impl(SrsLogLevel level, const char* tag, const SrsContextId& context_id, const char* fmt, ...)
|
||||
{
|
||||
if (!_srs_log) return;
|
||||
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
_srs_log->log(level, tag, context_id, fmt, args);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue