@@ -749,7 +749,7 @@ int flb_tail_file_append(char *path, struct stat *st, int mode,
749749
750750 /* Seek if required */
751751 if (file -> offset > 0 ) {
752- flb_plg_debug (ctx -> ins , "inode=%lu appended file following on offset=%lu" ,
752+ flb_plg_debug (ctx -> ins , "inode=%" PRIu64 " appended file following on offset=%lu" ,
753753 file -> inode , file -> offset );
754754 offset = lseek (file -> fd , file -> offset , SEEK_SET );
755755 if (offset == -1 ) {
@@ -765,7 +765,7 @@ int flb_tail_file_append(char *path, struct stat *st, int mode,
765765 flb_metrics_sum (FLB_TAIL_METRIC_F_OPENED , 1 , ctx -> ins -> metrics );
766766#endif
767767
768- flb_plg_debug (ctx -> ins , "inode=%lu appended as %s" , file -> inode , path );
768+ flb_plg_debug (ctx -> ins , "inode=%" PRIu64 " appended as %s" , file -> inode , path );
769769 return 0 ;
770770
771771error :
@@ -789,7 +789,7 @@ void flb_tail_file_remove(struct flb_tail_file *file)
789789
790790 ctx = file -> config ;
791791
792- flb_plg_debug (ctx -> ins , "inode=%lu removing file name %s" ,
792+ flb_plg_debug (ctx -> ins , "inode=%" PRIu64 " removing file name %s" ,
793793 file -> inode , file -> name );
794794
795795 if (file -> rotated > 0 ) {
@@ -930,7 +930,7 @@ int flb_tail_file_chunk(struct flb_tail_file *file)
930930 */
931931 ret = process_content (file , & processed_bytes );
932932 if (ret < 0 ) {
933- flb_plg_debug (ctx -> ins , "inode=%lu file=%s process content ERROR" ,
933+ flb_plg_debug (ctx -> ins , "inode=%" PRIu64 " file=%s process content ERROR" ,
934934 file -> inode , file -> name );
935935 return FLB_TAIL_ERROR ;
936936 }
@@ -999,20 +999,19 @@ int flb_tail_file_is_rotated(struct flb_tail_config *ctx,
999999 }
10001000
10011001 /* Check if the 'original monitored file' is a link and rotated */
1002- #ifndef _MSC_VER
10031002 if (file -> is_link == FLB_TRUE ) {
10041003 ret = lstat (file -> name , & st );
10051004 if (ret == -1 ) {
10061005 /* Broken link or missing file */
10071006 if (errno == ENOENT ) {
1008- flb_plg_info (ctx -> ins , "inode=%lu link_rotated: %s" ,
1007+ flb_plg_info (ctx -> ins , "inode=%" PRIu64 " link_rotated: %s" ,
10091008 file -> link_inode , file -> name );
10101009 return FLB_TRUE ;
10111010 }
10121011 else {
10131012 flb_errno ();
10141013 flb_plg_error (ctx -> ins ,
1015- "link_inode=%lu cannot detect if file: %s" ,
1014+ "link_inode=%" PRIu64 " cannot detect if file: %s" ,
10161015 file -> link_inode , file -> name );
10171016 return -1 ;
10181017 }
@@ -1027,13 +1026,12 @@ int flb_tail_file_is_rotated(struct flb_tail_config *ctx,
10271026 return FLB_TRUE ;
10281027 }
10291028 }
1030- #endif
10311029
10321030 /* Retrieve the real file name, operating system lookup */
10331031 name = flb_tail_file_name (file );
10341032 if (!name ) {
10351033 flb_plg_error (ctx -> ins ,
1036- "inode=%lu cannot detect if file was rotated: %s" ,
1034+ "inode=%" PRIu64 " cannot detect if file was rotated: %s" ,
10371035 file -> inode , file -> name );
10381036 return -1 ;
10391037 }
@@ -1054,7 +1052,7 @@ int flb_tail_file_is_rotated(struct flb_tail_config *ctx,
10541052 return FLB_FALSE ;
10551053 }
10561054
1057- flb_plg_debug (ctx -> ins , "inode=%lu rotated: %s => %s" ,
1055+ flb_plg_debug (ctx -> ins , "inode=%" PRIu64 " rotated: %s => %s" ,
10581056 file -> inode , file -> name , name );
10591057
10601058 flb_free (name );
@@ -1222,13 +1220,13 @@ int flb_tail_file_rotated(struct flb_tail_file *file)
12221220 return -1 ;
12231221 }
12241222
1225- flb_plg_debug (ctx -> ins , "inode=%lu rotated %s -> %s" ,
1223+ flb_plg_debug (ctx -> ins , "inode=%" PRIu64 " rotated %s -> %s" ,
12261224 file -> inode , file -> name , name );
12271225
12281226 /* Update local file entry */
12291227 tmp = file -> name ;
12301228 flb_tail_file_name_dup (name , file );
1231- flb_plg_info (ctx -> ins , "inode=%lu handle rotation(): %s => %s" ,
1229+ flb_plg_info (ctx -> ins , "inode=%" PRIu64 " handle rotation(): %s => %s" ,
12321230 file -> inode , tmp , file -> name );
12331231 if (file -> rotated == 0 ) {
12341232 file -> rotated = time (NULL );
@@ -1321,7 +1319,8 @@ int flb_tail_file_purge(struct flb_input_instance *ins,
13211319 ret = fstat (file -> fd , & st );
13221320 if (ret == 0 ) {
13231321 flb_plg_debug (ctx -> ins ,
1324- "inode=%lu purge rotated file %s (offset=%lu / size = %lu)" ,
1322+ "inode=%" PRIu64 " purge rotated file %s " \
1323+ "(offset=%lu / size = %" PRIu64 ")" ,
13251324 file -> inode , file -> name , file -> offset , st .st_size );
13261325 if (file -> pending_bytes > 0 && flb_input_buf_paused (ins )) {
13271326 flb_plg_warn (ctx -> ins , "purged rotated file while data "
@@ -1331,7 +1330,7 @@ int flb_tail_file_purge(struct flb_input_instance *ins,
13311330 }
13321331 else {
13331332 flb_plg_debug (ctx -> ins ,
1334- "inode=%lu purge rotated file %s (offset=%lu)" ,
1333+ "inode=%" PRIu64 " purge rotated file %s (offset=%lu)" ,
13351334 file -> inode , file -> name , file -> offset );
13361335 }
13371336
0 commit comments