1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Make some debug prints verbose-only, remove others

This commit is contained in:
Rémi Verschelde
2018-08-24 09:35:07 +02:00
parent d442f3d0aa
commit 52466d57e9
139 changed files with 172 additions and 803 deletions

View File

@@ -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);