There are limits, but that depends on:
- The underlying file system (even if the kernel supports large files, the FS may not)
- The capabilities of the underlying kernel's VFS layer (not all operating systems support large files, however most that can run web servers do).
Sometimes, you have facilities like logrotate
which can automatically handle chunking log files. Other times you do not.
Would you want to parse and sort a 10GB log file? If the underlying OS has no facilities to chunk / archive the logs, you need to handle that in your own code.
Its as simple as naming your log file after the month-year, unless you are sure that something else will chunk your logs for you. To be portable, have your logging function check it out.
Note, even on systems that have facilities to rotate logs, often the log rotator has to be told that your logs exist. One huge file is, under any circumstances .. questionable.