Logs

## Logs Logs — Support for logging the output of spawns |

## Synopsis

    #include <ogmjob-log.h>

    gboolean            ogmjob_log_open                     (const gchar *filename,
                                                             GError **error);
    gboolean            ogmjob_log_close                    (GError **error);
    void                ogmjob_log_write                    (const gchar *str);
    void                ogmjob_log_printf                   (const gchar *format,
                                                             ...);
    void                ogmjob_log_set_print_stdout         (gboolean log_stdout);
    gboolean            ogmjob_log_get_print_stdout         (void);
    void                ogmjob_log_set_print_stderr         (gboolean log_stderr);
    gboolean            ogmjob_log_get_print_stderr         (void);

## Description

## Details

### ogmjob_log_open ()

    gboolean            ogmjob_log_open                     (const gchar *filename,
                                                             GError **error);

Opens a new log file.

`filename` : | A filename
`error` : | Location to store the error occuring, or NULL to ignore errors.
Returns : | `TRUE`, when no error

### ogmjob_log_close ()

    gboolean            ogmjob_log_close                    (GError **error);

Closes the log file.

`error` : | Location to store the error occuring, or NULL to ignore errors.
Returns : | `TRUE`, when no error

### ogmjob_log_write ()

    void                ogmjob_log_write                    (const gchar *str);

Logs some information on stdout, stderr, and/or a file.

`str` : | A string to log

### ogmjob_log_printf ()

    void                ogmjob_log_printf                   (const gchar *format,
                                                             ...);

Logs some formatted information on stdout, stderr, and/or a file.

`format` : | A message format
`...` : | The parameters of the format string

### ogmjob_log_set_print_stdout ()

    void                ogmjob_log_set_print_stdout         (gboolean log_stdout);

Sets whether to log information on stdout.

`log_stdout` : | `TRUE` to log on stdout

### ogmjob_log_get_print_stdout ()

    gboolean            ogmjob_log_get_print_stdout         (void);

Gets whether to log information on stdout.

Returns : | `TRUE` if log on stdout

### ogmjob_log_set_print_stderr ()

    void                ogmjob_log_set_print_stderr         (gboolean log_stderr);

Sets whether to log information on stderr.

`log_stderr` : | `TRUE` to log on stderr

### ogmjob_log_get_print_stderr ()

    gboolean            ogmjob_log_get_print_stderr         (void);

Gets whether to log information on stderr.

Returns : | `TRUE` if log on stderr