microserve.logging module
Files
- file logging.cppm
- file wire.cpp
Functions
- void log_info(std::string_view msg)
- void log_warn(std::string_view msg)
- void log_error(std::string_view msg)
- void log_debug(std::string_view msg)
- void log_access(std::string_view msg)
- void logger_flush()
- void setup_logger()
- void set_logger_level(const std::string& level_name)
- void set_logger_identity(std::string_view tag)
- auto logger_identity() -> std::string
- auto site_error_log_path(std::string_view base_path, std::string_view site_name) -> std::string
- void rebind_logger_sinks(const std::string& file_path, bool to_stdout = true)
- void rebind_access_log(const std::string& file_path, bool to_stdout = false)
- void shutdown_logging()
- auto path_is_absolute(std::string_view path) -> bool
- True for a leading slash or a Windows drive path (
C:/...). - auto executable_directory() -> std::string
- Directory containing the running executable.
- auto join_path(std::string_view dir, std::string_view child) -> std::string
- Join
dirandchild. - void ensure_parent_directory(const std::string& file_path)
- Create the parent directory of
file_pathwhen it is missing. - auto write_pid_file(const std::string& path) -> bool
- Write this process id to
path, creating parent directories. - void remove_pid_file(const std::string& path)
- Remove a pid file created by write_
pid_ file. - void log_listener_urls(const std::string& kind, const std::string& scheme, const std::string& addr, unsigned short port)
- Log a human-readable listener URL for a started server.
Variables
- std::string_view LOGGER_NAME constexpr
- std::string_view LOGGER_PATTERN constexpr
- std::size_t LOGGER_QUEUE_SIZE constexpr
- int LOGGER_THREAD_COUNT constexpr
- std::size_t LOGGER_FILE_MAX_SIZE constexpr
- int LOGGER_FILE_MAX_COUNT constexpr