mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-30 10:29:02 +08:00
reformat code
This commit is contained in:
@@ -11,9 +11,9 @@ namespace sinks {
|
||||
|
||||
template <typename ConsoleMutex>
|
||||
ansicolor_sink<ConsoleMutex>::ansicolor_sink(FILE *target_file, color_mode mode)
|
||||
: target_file_(target_file)
|
||||
, mutex_(ConsoleMutex::mutex())
|
||||
, formatter_(std::make_unique<spdlog::pattern_formatter>())
|
||||
: target_file_(target_file),
|
||||
mutex_(ConsoleMutex::mutex()),
|
||||
formatter_(std::make_unique<spdlog::pattern_formatter>())
|
||||
|
||||
{
|
||||
set_color_mode(mode);
|
||||
|
@@ -22,10 +22,10 @@ rotating_file_sink<Mutex>::rotating_file_sink(filename_t base_filename,
|
||||
std::size_t max_files,
|
||||
bool rotate_on_open,
|
||||
const file_event_handlers &event_handlers)
|
||||
: base_filename_(std::move(base_filename))
|
||||
, max_size_(max_size)
|
||||
, max_files_(max_files)
|
||||
, file_helper_{event_handlers} {
|
||||
: base_filename_(std::move(base_filename)),
|
||||
max_size_(max_size),
|
||||
max_files_(max_files),
|
||||
file_helper_{event_handlers} {
|
||||
if (max_size == 0) {
|
||||
throw_spdlog_ex("rotating sink constructor: max_size arg cannot be zero");
|
||||
}
|
||||
|
@@ -24,9 +24,9 @@ namespace sinks {
|
||||
|
||||
template <typename ConsoleMutex>
|
||||
stdout_sink_base<ConsoleMutex>::stdout_sink_base(FILE *file)
|
||||
: mutex_(ConsoleMutex::mutex())
|
||||
, file_(file)
|
||||
, formatter_(std::make_unique<spdlog::pattern_formatter>()) {
|
||||
: mutex_(ConsoleMutex::mutex()),
|
||||
file_(file),
|
||||
formatter_(std::make_unique<spdlog::pattern_formatter>()) {
|
||||
#ifdef _WIN32
|
||||
// get windows handle from the FILE* object
|
||||
|
||||
|
@@ -13,9 +13,9 @@ namespace spdlog {
|
||||
namespace sinks {
|
||||
template <typename ConsoleMutex>
|
||||
wincolor_sink<ConsoleMutex>::wincolor_sink(void *out_handle, color_mode mode)
|
||||
: out_handle_(out_handle)
|
||||
, mutex_(ConsoleMutex::mutex())
|
||||
, formatter_(std::make_unique<spdlog::pattern_formatter>()) {
|
||||
: out_handle_(out_handle),
|
||||
mutex_(ConsoleMutex::mutex()),
|
||||
formatter_(std::make_unique<spdlog::pattern_formatter>()) {
|
||||
set_color_mode_impl(mode);
|
||||
// set level colors
|
||||
colors_.at(level_to_number(level::trace)) =
|
||||
|
Reference in New Issue
Block a user