]> git.sesse.net Git - vlc/blobdiff - modules/misc/logger.c
A bit of headers cleanup
[vlc] / modules / misc / logger.c
index 8a0ee53d55ee456297ec30373ec652ba2ed277ae..d9431d51a9dfccb3c810a97135cd560503072647 100644 (file)
@@ -35,8 +35,9 @@
 #endif
 
 #include <vlc/vlc.h>
-#include <vlc/intf.h>
-#include "charset.h"
+#include <vlc_interface.h>
+#include <vlc_playlist.h>
+#include <vlc_charset.h>
 
 #define MODE_TEXT 0
 #define MODE_HTML 1
@@ -126,7 +127,7 @@ static char *mode_list_text[] = { N_("Text"), "HTML"
 #endif
 
 vlc_module_begin();
-    set_shortname( N_( "Logging" ) );
+    set_shortname( _( "Logging" ) );
     set_description( _("File logging") );
 
     set_category( CAT_ADVANCED );
@@ -201,7 +202,7 @@ static int Open( vlc_object_t *p_this )
         if( !psz_file )
         {
 #ifdef __APPLE__
-            char *psz_homedir = p_this->p_vlc->psz_homedir;
+            char *psz_homedir = p_this->p_libvlc->psz_homedir;
 
             if( !psz_homedir )
             {
@@ -243,7 +244,7 @@ static int Open( vlc_object_t *p_this )
 
         /* Open the log file and remove any buffering for the stream */
         msg_Dbg( p_intf, "opening logfile `%s'", psz_file );
-        p_intf->p_sys->p_file = utf8_fopen( psz_file, "wt" );
+        p_intf->p_sys->p_file = utf8_fopen( psz_file, "at" );
         if( p_intf->p_sys->p_file == NULL )
         {
             msg_Err( p_intf, "error opening logfile `%s'", psz_file );
@@ -449,7 +450,7 @@ static void DoRRD( intf_thread_t *p_intf )
         lldiv_t dout = lldiv( p_playlist->p_stats->f_output_bitrate * 1000000,
                              1000 );
         fprintf( p_intf->p_sys->p_rrd,
-                   I64Fi":"I64Fd".%03u:"I64Fd".%03u:"I64Fd".%03u\n",
+                   I64Fi":%lld.%03u:%lld.%03u:%lld.%03u\n",
                    p_intf->p_sys->last_update/1000000,
                    din.quot, (unsigned int)din.rem,
                    ddm.quot, (unsigned int)ddm.rem,