.. efun:: void debug_message(string text) void debug_message(string text, int flags) :include: Prints the given text to stdout, stderr, the ``.debug.log`` file, or any combination of these. The parameter :arg:`flags` is a combination of bitflags determining the target and the mode of writing. The target flags are: :macro:`DMSG_STDOUT`, :macro:`DMSG_STDERR` and :macro:`DMSG_LOGFILE`. If the flag :macro:`DMSG_STAMP` is given, the message is prepended with the current date and time in the format ``YYYY.MM.DD HH:MM:SS``. If :arg:`flags` is given as 0, left out, or contains no target definition, :efun:`debug_message` will print to stdout and to the logfile. .. usage:: :: debug_message("This goes to stdout and the logfile.\n"); debug_message("This goes to stderr.\n", DMSG_STDERR); debug_message("This goes to stdout and stderr.\n" , DMSG_STDOUT | DMSG_STDERR); debug_message("This goes to stdout and the logfile, with timestamp.\n" , DMSG_STAMP); debug_message("This goes to stdout and has the timestamp in front.\n" , DMSG_STDOUT | DMSG_STAMP); :history 3.2.1@34 introduced: :history 3.2.9 changed: added the :arg:`flags` parameter .. seealso:: :efun:`last_instructions`