Skip to content

Adding minute_file_sink_mt #2727

@mmanoj

Description

@mmanoj

I created basic sink implementation as attached and driver code. However getting below errors. Please advice to fix it and if all fine we can merge with project.

===================
Errors
`logtest.cpp: In function ‘void setupLogging()’:
logtest.cpp:17:101: error: no matching function for call to ‘spdlog::sinks::minute_file_sinkstd::mutex::minute_file_sink(const char [13], const char [17], bool, int)’
17 | auto logger = spdlog::sinks::minute_file_sink_mt("basic_logger", "logs/min-log.txt",false,72);
| ^
In file included from logtest.cpp:10:
../include/spdlog/sinks/minute_file_sink.h:49:5: note: candidate: ‘spdlog::sinks::minute_file_sink<Mutex, FileNameCalc>::minute_file_sink(spdlog::filename_t, bool, uint16_t, const spdlog::file_event_handlers&) [with Mutex = std::mutex; FileNameCalc = spdlog::sinks::minute_filename_calculator; spdlog::filename_t = std::__cxx11::basic_string; uint16_t = short unsigned int]’
49 | minute_file_sink(
| ^~~~~~~~~~~~~~~~
../include/spdlog/sinks/minute_file_sink.h:50:109: note: no known conversion for argument 4 from ‘int’ to ‘const spdlog::file_event_handlers&’
50 | filename_t base_filename, bool truncate = false, uint16_t max_files = 0, const file_event_handlers &event_handlers = {})
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~

`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions