- else
- {
- msg_Warn( p_intf, "invalid log mode `%s', using `text'", psz_mode );
- p_sys->msg.i_mode = MODE_TEXT;
- }
- free( psz_mode );
- }
- else
- {
- msg_Warn( p_intf, "no log mode specified, using `text'" );
- }
-
- if( p_sys->msg.i_mode != MODE_SYSLOG )
- {
- char *psz_file = config_GetPsz( p_intf, "logfile" );
- if( !psz_file )
- {
-#ifdef __APPLE__
- char *home = config_GetUserDir(VLC_DOCUMENTS_DIR);
- if( home == NULL
- || asprintf( &psz_file, "%s/"LOG_DIR"/%s", home,
- (p_sys->msg.i_mode == MODE_HTML) ? LOG_FILE_HTML
- : LOG_FILE_TEXT ) == -1 )
- psz_file = NULL;
- free(home);
-#else
- switch( p_sys->msg.i_mode )
- {
- case MODE_HTML:
- psz_file = strdup( LOG_FILE_HTML );
- break;
- case MODE_TEXT:
- default:
- psz_file = strdup( LOG_FILE_TEXT );
- break;
- }