|
LogViewer
A modern log viewer with AI-assisted analysis (Qt 6)
|
Typedefs | |
| using | Pairs = std::vector< std::pair< std::string, std::string > > |
Functions | |
| bool | ReadGroup (std::string_view line, size_t &pos, std::string_view &content) |
| std::string_view | Trim (std::string_view s) |
| bool | LooksLikeIsoTimestamp (std::string_view ts) |
| Cheap sanity check that a field looks like "YYYY-MM-DD…". | |
| bool | IsBlank (char c) |
| bool | SplitTokens (std::string_view s, std::vector< std::string_view > &tokens) |
| bool | IsValidKey (std::string_view key) |
| bool | ParseKeyValue (std::string_view token, Pairs &pairs) |
| bool | ExtractKeyValues (std::string_view payload, Pairs &pairs) |
| std::string | JsonText (const nlohmann::ordered_json &v) |
| bool | ExtractJson (std::string_view payload, Pairs &pairs) |
| Flat or one-level-deep JSON object; deeper values stay compact JSON text. | |
Variables | |
| constexpr size_t | kBatchSize = 5000 |
| constexpr size_t | kFixedFields = 7 |
| constexpr std::string_view | kHeaderMarker = "# FULL MERGED TEST STEPS" |
| constexpr int | kHeaderProbeLines = 5 |
| constexpr size_t | kSniffBytes = 4096 |
| constexpr std::string_view | kUtf8Bom = "\xEF\xBB\xBF" |
| constexpr std::string_view | kPayloadPrefix = "p." |
| constexpr size_t | kMaxPayloadLength = 4096 |
| constexpr size_t | kMaxPayloadFields = 32 |
| constexpr size_t | kMaxFieldKeyLength = 64 |
| constexpr size_t | kMaxFieldValueLength = 512 |
| using parser::anonymous_namespace{SapiLogParser.cpp}::Pairs = typedef std::vector<std::pair<std::string, std::string> > |
| bool parser::anonymous_namespace{SapiLogParser.cpp}::ExtractJson | ( | std::string_view | payload, |
| Pairs & | pairs | ||
| ) |
Flat or one-level-deep JSON object; deeper values stay compact JSON text.


| bool parser::anonymous_namespace{SapiLogParser.cpp}::ExtractKeyValues | ( | std::string_view | payload, |
| Pairs & | pairs | ||
| ) |
key=value tokens, optionally inside bracket groups (one level). A group holding a single word without '=' is a label ([P0]) and is skipped.


| bool parser::anonymous_namespace{SapiLogParser.cpp}::IsBlank | ( | char | c | ) |


| bool parser::anonymous_namespace{SapiLogParser.cpp}::IsValidKey | ( | std::string_view | key | ) |


| std::string parser::anonymous_namespace{SapiLogParser.cpp}::JsonText | ( | const nlohmann::ordered_json & | v | ) |


| bool parser::anonymous_namespace{SapiLogParser.cpp}::LooksLikeIsoTimestamp | ( | std::string_view | ts | ) |
Cheap sanity check that a field looks like "YYYY-MM-DD…".


| bool parser::anonymous_namespace{SapiLogParser.cpp}::ParseKeyValue | ( | std::string_view | token, |
| Pairs & | pairs | ||
| ) |
Parses one key=value token; a value wrapped in matching quotes is unquoted (backslash escapes the next character).


| bool parser::anonymous_namespace{SapiLogParser.cpp}::ReadGroup | ( | std::string_view | line, |
| size_t & | pos, | ||
| std::string_view & | content | ||
| ) |
Reads the balanced [...] group starting at line[pos] (which must be '['). On success content is the text between the outer brackets and pos moves past the closing ']'. Returns false when the group never closes.


| bool parser::anonymous_namespace{SapiLogParser.cpp}::SplitTokens | ( | std::string_view | s, |
| std::vector< std::string_view > & | tokens | ||
| ) |
Splits s at whitespace outside [...]/{...} and outside a quoted value (a quote right after '='). False on unbalanced brackets or an unterminated quote.


| std::string_view parser::anonymous_namespace{SapiLogParser.cpp}::Trim | ( | std::string_view | s | ) |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |