OpenTTD Source
12.0-beta2
|
#include "stdafx.h"
#include <stdarg.h>
#include "console_func.h"
#include "debug.h"
#include "string_func.h"
#include "fileio_func.h"
#include "settings_type.h"
#include "walltime_func.h"
#include "network/network_admin.h"
#include "safeguards.h"
Go to the source code of this file.
Data Structures | |
struct | DebugLevel |
Macros | |
#define | DEBUG_LEVEL(x) { #x, &_debug_##x##_level } |
Functions | |
char * | DumpDebugFacilityNames (char *buf, char *last) |
Dump the available debug facility names in the help text. More... | |
void | DebugPrint (const char *level, const std::string &message) |
Internal function for outputting the debug line. More... | |
void | SetDebugString (const char *s) |
Set debugging levels by parsing the text in s. More... | |
const char * | GetDebugString () |
Print out the current debug-level. More... | |
const char * | GetLogPrefix () |
Get the prefix for logs; if show_date_in_logs is enabled it returns the date, otherwise it returns nothing. More... | |
Variables | |
SOCKET | _debug_socket = INVALID_SOCKET |
int | _debug_driver_level |
int | _debug_grf_level |
int | _debug_map_level |
int | _debug_misc_level |
int | _debug_net_level |
int | _debug_sprite_level |
int | _debug_oldloader_level |
int | _debug_npf_level |
int | _debug_yapf_level |
int | _debug_freetype_level |
int | _debug_script_level |
int | _debug_sl_level |
int | _debug_gamelog_level |
int | _debug_desync_level |
int | _debug_console_level |
static const DebugLevel | debug_level [] |
Handling of printing debug messages.
Definition in file debug.cpp.
void DebugPrint | ( | const char * | level, |
const std::string & | message | ||
) |
char* DumpDebugFacilityNames | ( | char * | buf, |
char * | last | ||
) |
const char* GetDebugString | ( | ) |
const char* GetLogPrefix | ( | ) |
Get the prefix for logs; if show_date_in_logs is enabled it returns the date, otherwise it returns nothing.
Definition at line 221 of file debug.cpp.
References _settings_client, Time< T >::Format(), ClientSettings::gui, lastof, and GUISettings::show_date_in_logs.
void SetDebugString | ( | const char * | s | ) |
Set debugging levels by parsing the text in s.
For setting individual levels a string like "net=3,grf=6"
should be used. If the string starts with a number, the number is used as global debugging level.
s | Text describing the wanted debugging levels. |
|
static |