Skip to content

LK_LOG_* using spdlog, supporting users specifying their own logging …#68

Open
stephen-derosa wants to merge 3 commits intolivekit:mainfrom
stephen-derosa:sderosa/CLT-2587-spdlog
Open

LK_LOG_* using spdlog, supporting users specifying their own logging …#68
stephen-derosa wants to merge 3 commits intolivekit:mainfrom
stephen-derosa:sderosa/CLT-2587-spdlog

Conversation

@stephen-derosa
Copy link
Contributor

Overview

LK_LOG system for using spdlog instead of std::cerr/cout or printf.

Examples

  • examples/logging_levels/basic_usage.cpp: setting log levels levels
  • examples/logging_levels/custom_sinks.cpp: users specifying a log system other than spdlog (i.e. in the case applications already have their own logging systems)

Testing

Logger integration tests

@stephen-derosa stephen-derosa self-assigned this Feb 27, 2026
@stephen-derosa stephen-derosa added the enhancement New feature or request label Feb 27, 2026
namespace livekit {

void initializeLogger();
void shutdownLogger();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question
should we just embed the initializeLogger into the initialize() function ? and not expose initializeLogger and shutdownLogger() ?

I think it is very important to keep the public APIs small.

void initializeLogger();
void shutdownLogger();

bool initialize(LogLevel level) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need to overload this initialize() function ?

how about
bool initialize(LogSink log_sink, LogLevel level) ?

@xianshijing-lk
Copy link
Collaborator

some questions to the public APIs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants