Log4gThread

Log4gThread — Set the thread name for log messages

Synopsis

                    Log4gThread;
                    Log4gThreadClass;
const gchar *       log4g_thread_get_name               (void);
void                log4g_thread_set_name               (const gchar *name);

Description

In order for a thread to have a name in the log output it must first be set. This class allows the user to set the thread name. If the thread name is not explicitly set then the name "thread1", with the number incrementing for each thread, is used.

The initialization process will set the name of the main thread to "main".

Note

The thread numbers are created in the order that messages are logged not the order that the threads were created. If you are debugging a thread issue it is recommended to explicitly set the thread name.

Details

Log4gThread

typedef struct {
} Log4gThread;

The Log4gThread structure does not have any public members.


Log4gThreadClass

typedef struct {
} Log4gThreadClass;

The Log4gThreadClass structure does not have any public members.


log4g_thread_get_name ()

const gchar *       log4g_thread_get_name               (void);

Retrieve the name of the current thread.

Returns :

The name of the current thread.

Since 0.1


log4g_thread_set_name ()

void                log4g_thread_set_name               (const gchar *name);

Set the name of the current thread.

name :

The new name of the current thread.

Since 0.1