cronosplit(1m)

πŸ“¦
version 1.6.2+rpk Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ cronosplit(1m) ✨

okay bestie, buckle up πŸ’– this is the manual page for cronosplit, and it lives in section 1m of the manual (iykyk). it's a whole mood and also a whole log-splitting tool, so let's get into it 🫢


🌸 NAME 🌸

cronosplit β€” split log files into cronolog-compatible files πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

cronosplit --template=TEMPLATE [--print-invalid] [--help] [--version]
file ...

πŸ¦‹ DESCRIPTION πŸ¦‹

so cronosplit is a simple little program (iconic behaviour, honestly) that reads lines from a set of input log files β€” and those files must be in Common Log Format or NCSA Combined/XLF/ELF Format, no exceptions bestie β€” and writes each line out to an output file. πŸ“

the name of that output file? constructed using the template you specify plus the timestamp from the line itself. it's giving ✨customised✨.

and the template uses the same format specifiers as the Unix date(1) command β€” which are literally the same as the standard C strftime library function. no cap. πŸ‘‘


✨ Options ✨

cronosplit accepts the following options and arguments, bestie, here's the full list, no skips:

  • --template=TEMPLATE β€” specifies the template for the output log files (using the format specifiers described below πŸ‘‡).
  • --print-invalid β€” print invalid log file entries to the standard error stream. πŸ“’
  • --utime β€” update modification time of output file according to last parsed log entry.
  • --verbose β€” print additional status messages to the standard error stream.
  • --debug β€” print debug messages to the standard error stream. πŸ›
  • --help β€” print a help message and then exit. bye bestie 🫢
  • --version β€” print version information and exit.

πŸ’œ Template format πŸ’œ

okay so here's the tea: every single character in the template represents a character in the expanded filename… except for the date and time format specifiers, which get replaced by their expansion. πŸ’«

a format specifier is a % followed by one of these characters:

  • % β€” a literal % character
  • n β€” a new-line character
  • t β€” a horizontal tab character

🌈 Time fields:

  • H β€” hour (00..23)
  • I β€” hour (01..12)
  • p β€” the locale's AM or PM indicator
  • M β€” minute (00..59)
  • S β€” second (00..61, which allows for leap seconds) β€” yes fr fr, sixty-one, leap seconds are real
  • X β€” the locale's time representation (e.g.: "15:12:47")
  • Z β€” time zone (e.g. GMT), or nothing if the time zone cannot be determined πŸ™ˆ

🌸 Date fields:

  • a β€” the locale's abbreviated weekday name (e.g.: Sun..Sat)
  • A β€” the locale's full weekday name (e.g.: Sunday .. Saturday)
  • b β€” the locale's abbreviated month name (e.g.: Jan .. Dec)
  • B β€” the locale's full month name, (e.g.: January .. December)
  • c β€” the locale's date and time (e.g.: "Sun Dec 15 14:12:47 GMT 1996")
  • d β€” day of month (01 .. 31)
  • j β€” day of year (001 .. 366)
  • m β€” month (01 .. 12)
  • U β€” week of the year with Sunday as first day of week (00..53, where week 1 is the week containing the first Sunday of the year)
  • W β€” week of the year with Monday as first day of week (00..53, where week 1 is the week containing the first Monday of the year)
  • w β€” day of week (0 .. 6, where 0 corresponds to Sunday)
  • x β€” locale's date representation (e.g. today in Britain: "12/04/96")
  • y β€” year without the century (00 .. 99)
  • Y β€” year with the century (1970 .. 2038)
other specifiers may be available depending on the C library's implementation of the strftime function. so like, vibe check your libc, bestie 🧚

πŸ‘‘ SEE ALSO πŸ‘‘

apache(1m) cronolog(1m) date(1) strftime(3) environ(5)

more information and the latest version of cronolog and cronosplit can be obtained from

http://www.ford-mason.co.uk/resources/cronolog/

if you have any suggestions, bug reports, fixes, or enhancements, please mail them to the author. πŸ“¬ (they're nice, promise)


πŸ’– More about Apache πŸ’–

documentation for the Apache http server is available from

http://www.apache.org

⭐ AUTHOR ⭐

Andrew Ford <A.Ford@ford-mason.co.uk>

cronosplit is based on a script called splitlog by Roy Fielding, which is part of the wwwstat package. shoutout to the OGs 🫢✨


and that's the whole thing bestie, no crumbs left πŸ’… this was the cronosplit(1m) page, dated March 1998, and it's lowkey a classic. periodt. πŸŒˆπŸ‘‘πŸ’–

πŸ“¦ where this page comes from