Skip to content

Commit

Permalink
file upload handler: use MSG_DETAIL for high volume log output
Browse files Browse the repository at this point in the history
This way the FUH can be run in DEBUG mode to see unrecognized tags and timing statistics but the request themselves are not logged.
  • Loading branch information
ChristianBeer committed Sep 20, 2017
1 parent 94051c3 commit 536e2d5
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions sched/file_upload_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,7 @@ int handle_file_upload(FILE* in, R_RSA_PUBLIC_KEY& key) {
strcpy(xml_signature, "");
bool found_data = false;
while (fgets(buf, 256, in)) {
// intentionally set higher than debug as it may produce lots of output
if (config.fuh_debug_level > MSG_DEBUG) {
log_messages.printf(MSG_DEBUG, "got:%s\n", buf);
}
log_messages.printf(MSG_DETAIL, "got:%s\n", buf);
if (match_tag(buf, "<file_info>")) continue;
if (match_tag(buf, "</file_info>")) continue;
if (match_tag(buf, "<signed_xml>")) continue;
Expand Down Expand Up @@ -562,7 +559,7 @@ int handle_request(FILE* in, R_RSA_PUBLIC_KEY& key) {
log_messages.set_indent_level(1);
#endif
while (fgets(buf, 256, in)) {
log_messages.printf(MSG_DEBUG, "handle_request: %s", buf);
log_messages.printf(MSG_DETAIL, "handle_request: %s", buf);
if (parse_int(buf, "<core_client_major_version>", major)) {
continue;
} else if (parse_int(buf, "<core_client_minor_version>", minor)) {
Expand Down

0 comments on commit 536e2d5

Please sign in to comment.