From 5dc6cec46652ef2b1a95a3586facf57dc767d535 Mon Sep 17 00:00:00 2001 From: gabime Date: Thu, 8 May 2025 15:00:12 +0300 Subject: [PATCH] fix comments grammar --- include/spdlog/spdlog.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/spdlog/spdlog.h b/include/spdlog/spdlog.h index a8afbcec..36e7f77d 100644 --- a/include/spdlog/spdlog.h +++ b/include/spdlog/spdlog.h @@ -25,7 +25,7 @@ namespace spdlog { using default_factory = synchronous_factory; // Create and register a logger with a templated sink type -// The logger's level, formatter and flush level will be set according the +// The logger's level, formatter and flush level will be set according to the // global settings. // // Example: @@ -46,7 +46,7 @@ inline std::shared_ptr create(std::string logger_name, SinkArgs // spdlog::initialize_logger(mylogger); SPDLOG_API void initialize_logger(std::shared_ptr logger); -// Return an existing logger or nullptr if a logger with such name doesn't +// Return an existing logger or nullptr if a logger with such a name doesn't // exist. // example: spdlog::get("my_logger")->info("hello {}", "world"); SPDLOG_API std::shared_ptr get(const std::string &name); @@ -71,13 +71,13 @@ SPDLOG_API void dump_backtrace(); // Get global logging level SPDLOG_API level::level_enum get_level(); -// Set global logging level +// Set the global logging level SPDLOG_API void set_level(level::level_enum log_level); // Determine whether the default logger should log messages with a certain level SPDLOG_API bool should_log(level::level_enum lvl); -// Set global flush level +// Set a global flush level SPDLOG_API void flush_on(level::level_enum log_level); // Start/Restart a periodic flusher thread @@ -93,7 +93,7 @@ SPDLOG_API void set_error_handler(void (*handler)(const std::string &msg)); // Register the given logger with the given name SPDLOG_API void register_logger(std::shared_ptr logger); -// Apply a user defined function on all registered loggers +// Apply a user-defined function on all registered loggers // Example: // spdlog::apply_all([&](std::shared_ptr l) {l->flush();}); SPDLOG_API void apply_all(const std::function)> &fun); @@ -111,19 +111,19 @@ SPDLOG_API void shutdown(); SPDLOG_API void set_automatic_registration(bool automatic_registration); // API for using default logger (stdout_color_mt), -// e.g: spdlog::info("Message {}", 1); +// e.g.: spdlog::info("Message {}", 1); // // The default logger object can be accessed using the spdlog::default_logger(): // For example, to add another sink to it: // spdlog::default_logger()->sinks().push_back(some_sink); // -// The default logger can replaced using spdlog::set_default_logger(new_logger). +// The default logger can be replaced using spdlog::set_default_logger(new_logger). // For example, to replace it with a file logger. // // IMPORTANT: // The default API is thread safe (for _mt loggers), but: // set_default_logger() *should not* be used concurrently with the default API. -// e.g do not call set_default_logger() from one thread while calling spdlog::info() from another. +// e.g., do not call set_default_logger() from one thread while calling spdlog::info() from another. SPDLOG_API std::shared_ptr default_logger();