ColdFusion 2018 CFLog

New Here ,
Jun 06, 2019 Jun 06, 2019

Copy link to clipboard

Copied

Hi,

How can we get cflog files created per day?

Thank you.

Views

326

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

Adobe Community Professional , Jun 06, 2019 Jun 06, 2019
I don't think you have any control over the built-in log rolling functionality.Dave Watts, Eidolon LLC

Likes

Translate

Translate
Adobe Community Professional ,
Jun 06, 2019 Jun 06, 2019

Copy link to clipboard

Copied

If you're using CFLOG to create your own log files, you can specify the exact name of those files, as described here:

https://www.raymondcamden.com/2010/11/29/Ask-a-Jedi-Prevent-ColdFusion-from-deleting-log-files

As for the "built-in" log files, there's no control over the log rolling process as far as I'm aware. So, you might want to use your own log files instead.

Dave Watts, Eidolon LLC

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 06, 2019 Jun 06, 2019

Copy link to clipboard

Copied

Thanks Dave. It is custom log file. As per link, it is suggesting to use cffile. We have this coded for 20 files and I want to avoid modifying this files.

Is there way, I can roll it by size?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 06, 2019 Jun 06, 2019

Copy link to clipboard

Copied

I don't think you have any control over the built-in log rolling functionality.

Dave Watts, Eidolon LLC

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 06, 2019 Jun 06, 2019

Copy link to clipboard

Copied

Thanks..Will have to use cffile then.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 06, 2019 Jun 06, 2019

Copy link to clipboard

Copied

Two things. First, you can indeed rotate the CF logs by size. That's the

default behavior. See the CF admin logging settings page for that, and to

change the size, if interested.

Second, as for log rotation by day, that's not a built-in feature. But there

is an AdminAPI method to rate the logs (just as most CF admin UI features

have an underyling admin API method). You could setup a scheduled task to

call that method nightly.

Here is a blog post that discusses that adminapi archiveLogFile ethod:

https://blog.trevorcotton.com/index.php/2017/07/27/rotating-your-coldfusion-

logs-daily/

Let us know if either of those suit your needs.


/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 07, 2019 Jun 07, 2019

Copy link to clipboard

Copied

LATEST

I didn't know about the admin API feature. Thanks!

Dave Watts, Eidolon LLC

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines