Gwyddion – Free SPM (AFM, SNOM/NSOM, STM, MFM, …) data analysis software

logging (HEAD)

logging — Program message log


void gwy_app_setup_logging ()
GtkTextBuffer * gwy_app_get_log_text_buffer ()

Types and Values

enum GwyAppLoggingFlags


#include <app/gwyapp.h>



gwy_app_setup_logging ()

gwy_app_setup_logging (GwyAppLoggingFlags flags);

Sets up Gwyddion GLib log handler.

The log handler sends the messages to a log file or console, as Gwyddion usually does. This function may not be useful in Gwyddion-based programs unless they try to emulate Gwyddion behaviour closely.



Flags controlling how messages are handled.


Since: 2.45

gwy_app_get_log_text_buffer ()

GtkTextBuffer *
gwy_app_get_log_text_buffer (void);

Obtains a text buffer with program log messages.

This functions may only be called after gwy_app_setup_logging() and, obviously, after GTK+ was intialised.

The text buffer is owned by the library and must not be modified nor destroyed. It will be already filled with messages occurring between gwy_app_setup_logging() and this function call. New messages will be appended to the buffer as they arrive.


Text buffer with the program log messages.

Since: 2.45

Types and Values

enum GwyAppLoggingFlags

Flags controlling where program messages are written.



Messages go to a log file, either gwyddion.log or given by environment variable GWYDDION_LOGFILE.



Messages go to standard output and standard error depending on message type (emulating where GLib sends them).


Since: 2.45

© David Nečas and Petr Klapetek

Home Download News Features Screenshots Documentation Communicate Participate Resources Publications Applications Site Map

Valid XHTML 1.0 Valid CSS