-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FR] binary/hex data display #639
Comments
zhuzhzh
changed the title
binary/hex data display
[feature request] binary/hex data display
Jan 4, 2025
zhuzhzh
changed the title
[feature request] binary/hex data display
[FR] binary/hex data display
Jan 4, 2025
Hey, there is a similar function in For example #include "quill/Backend.h"
#include "quill/Frontend.h"
#include "quill/LogMacros.h"
#include "quill/Logger.h"
#include "quill/sinks/ConsoleSink.h"
#include "quill/Utility.h"
#include <iostream>
#include <string>
#include <utility>
#include <array>
/**
* Trivial logging example to console
* Note: You can also pass STL types by including the relevant header files from quill/std/
*/
int main()
{
quill::BackendOptions backend_options;
quill::Backend::start(backend_options);
// Frontend
auto console_sink = quill::Frontend::create_or_get_sink<quill::ConsoleSink>(
"sink_id_1", quill::ConsoleSink::ColourMode::Automatic);
quill::Logger* logger = quill::Frontend::create_or_get_logger("root", std::move(console_sink));
std::array<char, 80> buffer;
buffer[0] = 'A';
buffer[1] = 'B';
LOG_INFO(logger, "Hex: {}", quill::utility::to_hex(buffer.data(), buffer.size()));
}
|
@odygrd Thanks! It's great that it's already supported. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think we could refer to spdlog. basicly, we need one pre-defineed formatting for display hex or binary data, especially for vector or array.
The text was updated successfully, but these errors were encountered: