diff options
author | Quentin Glidic <sardemff7+git@sardemff7.net> | 2017-04-15 11:58:49 +0200 |
---|---|---|
committer | Quentin Glidic <sardemff7+git@sardemff7.net> | 2017-04-15 12:07:29 +0200 |
commit | cfbe4027bcbafe4715bbba1b36799002c719a81e (patch) | |
tree | 4811b9d0766298ea0093d5266dd7b2248359416e /source/dialogs/ssh.c | |
parent | ba9e1fb92a3d4428252f36e8df0dc77cd3874179 (diff) |
Consolidate logging
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Diffstat (limited to 'source/dialogs/ssh.c')
-rw-r--r-- | source/dialogs/ssh.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/source/dialogs/ssh.c b/source/dialogs/ssh.c index 0dc2d9a7..0bc277fb 100644 --- a/source/dialogs/ssh.c +++ b/source/dialogs/ssh.c @@ -29,6 +29,12 @@ * \ingroup SSHMode * @{ */ + +/** + * Log domain for the ssh modi. + */ +#define G_LOG_DOMAIN "Dialogs.Ssh" + #include <config.h> #include <glib.h> #include <stdlib.h> @@ -51,13 +57,6 @@ #include "dialogs/ssh.h" /** - * Log domain for the ssh modi. - */ - -#undef G_LOG_DOMAIN -#define G_LOG_DOMAIN "Dialogs.Ssh" - -/** * Name of the history file where previously choosen hosts are stored. */ #define SSH_CACHE_FILE "rofi-2.sshcache" @@ -181,7 +180,7 @@ static char **read_known_hosts_file ( char ** retv, unsigned int *length ) free ( buffer ); } if ( fclose ( fd ) != 0 ) { - fprintf ( stderr, "Failed to close hosts file: '%s'\n", strerror ( errno ) ); + g_warning ( "Failed to close hosts file: '%s'", g_strerror ( errno ) ); } } @@ -256,7 +255,7 @@ static char **read_hosts_file ( char ** retv, unsigned int *length ) free ( buffer ); } if ( fclose ( fd ) != 0 ) { - fprintf ( stderr, "Failed to close hosts file: '%s'\n", strerror ( errno ) ); + g_warning ( "Failed to close hosts file: '%s'", g_strerror ( errno ) ); } } @@ -357,7 +356,7 @@ static void parse_ssh_config_file ( const char *filename, char ***retv, unsigned } if ( fclose ( fd ) != 0 ) { - fprintf ( stderr, "Failed to close ssh configuration file: '%s'\n", strerror ( errno ) ); + g_warning ( "Failed to close ssh configuration file: '%s'", g_strerror ( errno ) ); } } } |