## Logs

Logs — Support for logging the output of spawns

## Functions

gboolean | ogmjob_log_open ()
gboolean | ogmjob_log_close ()
void | ogmjob_log_write ()
void | ogmjob_log_printf ()
void | ogmjob_log_set_print_stdout ()
gboolean | ogmjob_log_get_print_stdout ()
void | ogmjob_log_set_print_stderr ()
gboolean | ogmjob_log_get_print_stderr ()

## Object Hierarchy

## Includes

    #include <ogmjob-log.h>

## Description

## Functions

### ogmjob_log_open ()

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

Opens a new log file.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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

## Types and Values