mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-28 12:13:55 +08:00
Add reader flog category
For both input and reader, because the "reader" term is more general and we don't have enough messages to justify multiple categories
This commit is contained in:
parent
a48926dee5
commit
8b1ac0912b
|
@ -92,6 +92,8 @@ class category_list_t {
|
||||||
category_t iothread{L"iothread", L"Background IO thread events"};
|
category_t iothread{L"iothread", L"Background IO thread events"};
|
||||||
|
|
||||||
category_t term_support{L"term-support", L"Terminal feature detection"};
|
category_t term_support{L"term-support", L"Terminal feature detection"};
|
||||||
|
|
||||||
|
category_t reader{L"reader", L"The interactive reader/input system"};
|
||||||
};
|
};
|
||||||
|
|
||||||
/// The class responsible for logging.
|
/// The class responsible for logging.
|
||||||
|
|
|
@ -458,7 +458,7 @@ void inputter_t::mapping_execute_matching_or_generic(bool allow_commands) {
|
||||||
if (auto mapping = find_mapping()) {
|
if (auto mapping = find_mapping()) {
|
||||||
mapping_execute(*mapping, allow_commands);
|
mapping_execute(*mapping, allow_commands);
|
||||||
} else {
|
} else {
|
||||||
debug(2, L"no generic found, ignoring char...");
|
FLOGF(reader, L"no generic found, ignoring char...");
|
||||||
auto evt = event_queue_.readch();
|
auto evt = event_queue_.readch();
|
||||||
if (evt.is_eof()) {
|
if (evt.is_eof()) {
|
||||||
event_queue_.push_front(evt);
|
event_queue_.push_front(evt);
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#include "env.h"
|
#include "env.h"
|
||||||
#include "env_universal_common.h"
|
#include "env_universal_common.h"
|
||||||
#include "fallback.h" // IWYU pragma: keep
|
#include "fallback.h" // IWYU pragma: keep
|
||||||
|
#include "flog.h"
|
||||||
#include "global_safety.h"
|
#include "global_safety.h"
|
||||||
#include "input_common.h"
|
#include "input_common.h"
|
||||||
#include "iothread.h"
|
#include "iothread.h"
|
||||||
|
@ -188,7 +189,7 @@ char_event_t input_event_queue_t::readch() {
|
||||||
switch (sz) {
|
switch (sz) {
|
||||||
case static_cast<size_t>(-1): {
|
case static_cast<size_t>(-1): {
|
||||||
std::memset(&state, '\0', sizeof(state));
|
std::memset(&state, '\0', sizeof(state));
|
||||||
debug(2, L"Illegal input");
|
FLOG(reader, L"Illegal input");
|
||||||
return char_event_type_t::check_exit;
|
return char_event_type_t::check_exit;
|
||||||
}
|
}
|
||||||
case static_cast<size_t>(-2): {
|
case static_cast<size_t>(-2): {
|
||||||
|
|
|
@ -3311,7 +3311,7 @@ maybe_t<wcstring> reader_data_t::readline(int nchars_or_0) {
|
||||||
} else {
|
} else {
|
||||||
// This can happen if the user presses a control char we don't recognize. No
|
// This can happen if the user presses a control char we don't recognize. No
|
||||||
// reason to report this to the user unless they've enabled debugging output.
|
// reason to report this to the user unless they've enabled debugging output.
|
||||||
debug(2, _(L"Unknown key binding 0x%X"), c);
|
FLOGF(reader, _(L"Unknown key binding 0x%X"), c);
|
||||||
}
|
}
|
||||||
rls.last_cmd = none();
|
rls.last_cmd = none();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user