Creating logs

I am trying to create some log files with hyperlinks. I am new to coding and have been playing with mysql and php. I am not sure if lig files should be stored in a database as there will be a lot and they will get big over time. I can write to a file and create html hyperlink tags with subsequent append but am wondering if I should just store this in a database and read the table into a file? I am leaning to the file method as I can use a meta tag to refresh the log which will be written by multiple users. So my questions are:

is there a better/alternative method that would work better?

Is there a way to truncate or roll older comments in the log files to keep them from getting too big?

I am looking to dump the contents into a text area tag to size the text and add scrolling capabilities. I know this is a plain text are but is there a snippet for creating hyperlinks in a textarea?

Thanks

Logs are usually stored as local text files. The idea is to be able to use simple tools such as grep to find what you’re looking for quickly.

There’s monolog library which is very helpful and easy to use.

I believe monolog takes care of this but, if not, you can use logrotate

Sponsor our Newsletter | Privacy Policy | Terms of Service