• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

648

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

Community Expert , 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

Votes

Translate

Translate
Community Expert ,
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

Votes

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?

Votes

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
Community Expert ,
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

Votes

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.

Votes

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
Community Expert ,
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 (troubleshooter, carehart.org)

Votes

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
Community Expert ,
Jun 07, 2019 Jun 07, 2019

Copy link to clipboard

Copied

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

Dave Watts, Eidolon LLC

Votes

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
Participant ,
Jun 01, 2023 Jun 01, 2023

Copy link to clipboard

Copied

LATEST

One idea - Use cflog with custom file names based on the date, week or month you are trying to capture.  So you end up with logs based some span of time.

Votes

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
Resources
Documentation