[Archivesspace_Users_Group] logrotate and "binary" logs

Dyson-Smith, Bridger bdysonsm at utk.edu
Wed Jun 16 12:47:45 EDT 2021


On Wed, 2021-06-16 at 16:44 +0000, Peter Heiner wrote:
> 
> > On Tue, 2021-06-15 at 08:42 +0000, Peter Heiner wrote:
> > > > $ file as-log.out
> > > > as-log.out: data
> > > This looks like the file utility was unable to determine the type
> > > of
> > > as-log.out. As it should normally be able to identify all types
> > > emitted
> > > by logrotate, this suggests to me that the actual file it was ran
> > > on is
> > > corrupt.
> > I'm not sure about corrupt, but I won't rule it out. I'm not sure
> > because `cat`, `tail`, and some other utilities seem to work
> > correctly
> > (but maybe they're more forgiving?). Thanks for the suggestion!
> 
> If other utilities work well with the file, meaning for example that
> less
> or tail do not complain that the file may be binary, then I wouldn't
> worry
> too much about it.
> It's also possible for different contents in the file to yield
> different results.
> Identifying log files certainly seems capricious on my laptop:
> 
> [ph448 at sparkly log]$ file pacman.log 
> pacman.log: Unicode text, UTF-8 text
> [ph448 at sparkly log]$ file xdm.log
> xdm.log: ASCII text
> [ph448 at sparkly log]$ file Xorg.0.log
> Xorg.0.log: JSON data
> 
> All 3 files are plaintext logs. 
> 
> 
Aren't computers fun?

> p

After some fiddling with the logrotate configuration, it looks like the
default gzip compression is introducing the (apparent) binary file
metadata. I've removed it for now. 

Thanks!
Best,
Bridger
> _______________________________________________
> Archivesspace_Users_Group mailing list
> Archivesspace_Users_Group at lyralists.lyrasis.org
> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group



More information about the Archivesspace_Users_Group mailing list