diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-08-24 09:35:07 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2018-08-24 14:59:01 +0200 |
commit | 52466d57e9c2897c40698a09482e5e7de230368f (patch) | |
tree | 54ff3bb78961ca5d8120cc7e6abe91f5c99d92b7 /editor/fileserver | |
parent | d442f3d0aa4185f154bee396efaf24ceb73c9d84 (diff) |
Make some debug prints verbose-only, remove others
Diffstat (limited to 'editor/fileserver')
-rw-r--r-- | editor/fileserver/editor_file_server.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/editor/fileserver/editor_file_server.cpp b/editor/fileserver/editor_file_server.cpp index b9e0c7d0fa..28b1095256 100644 --- a/editor/fileserver/editor_file_server.cpp +++ b/editor/fileserver/editor_file_server.cpp @@ -34,9 +34,10 @@ #include "io/marshalls.h" //#define DEBUG_PRINT(m_p) print_line(m_p) -#define DEBUG_TIME(m_what) printf("MS: %s - %lu\n", m_what, OS::get_singleton()->get_ticks_usec()); +//#define DEBUG_TIME(m_what) printf("MS: %s - %lu\n", m_what, OS::get_singleton()->get_ticks_usec()); -//#define DEBUG_TIME(m_what) +#define DEBUG_PRINT(m_what) +#define DEBUG_TIME(m_what) void EditorFileServer::_close_client(ClientData *cd) { @@ -107,7 +108,6 @@ void EditorFileServer::_subthread_start(void *s) { //wait for ID err = cd->connection->get_data(buf4, 4); - //#define DEBUG_PRINT(m_p) print_line(m_p) DEBUG_TIME("get_data") if (err != OK) { @@ -150,13 +150,13 @@ void EditorFileServer::_subthread_start(void *s) { s.parse_utf8(fileutf8.ptr()); if (cmd == FileAccessNetwork::COMMAND_FILE_EXISTS) { - print_line("FILE EXISTS: " + s); + DEBUG_PRINT("FILE EXISTS: " + s); } if (cmd == FileAccessNetwork::COMMAND_GET_MODTIME) { - print_line("MOD TIME: " + s); + DEBUG_PRINT("MOD TIME: " + s); } if (cmd == FileAccessNetwork::COMMAND_OPEN_FILE) { - print_line("OPEN: " + s); + DEBUG_PRINT("OPEN: " + s); } if (!s.begins_with("res://")) { @@ -243,7 +243,7 @@ void EditorFileServer::_subthread_start(void *s) { int read = cd->files[id]->get_buffer(buf.ptrw(), blocklen); ERR_CONTINUE(read < 0); - print_line("GET BLOCK - offset: " + itos(offset) + ", blocklen: " + itos(blocklen)); + DEBUG_PRINT("GET BLOCK - offset: " + itos(offset) + ", blocklen: " + itos(blocklen)); //not found, continue encode_uint32(id, buf4); @@ -259,7 +259,7 @@ void EditorFileServer::_subthread_start(void *s) { } break; case FileAccessNetwork::COMMAND_CLOSE: { - print_line("CLOSED"); + DEBUG_PRINT("CLOSED"); ERR_CONTINUE(!cd->files.has(id)); memdelete(cd->files[id]); cd->files.erase(id); |