CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • .log files...how often do they change out, how big can they get?
Pages: 1 [2]

Author Topic: .log files...how often do they change out, how big can they get?  (Read 3486 times)

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: .log files...how often do they change out, how big can they get?
March 21, 2011, 08:04:04 am

The upgrade automatically nukes that directory, to avoid a lot of log file buildup

would be great if u can submit a patch that disables CiviLogging if Drupal Logging is enabled

the code to change it is here:

CRM/Core/Error.php, function debug_log_message

the md5 hash that we introduced was to prevent hackers from viewing the log file and making it hard to guess. We later introduced the .htaccess file there to prevent any snooping in that directory

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: .log files...how often do they change out, how big can they get?
March 24, 2011, 11:15:37 pm
I've endeavored to make a script that will delete .log files older than 31 days.   The script works outside of CiviCRM, but not inside it.  Please review the code and offer advice, thanks.  then we can make a working patch

http://forum.civicrm.org/index.php/topic,19197.msg79897.html#msg79897
Try CiviTeacher: the online video tutorial CiviCRM learning library.

arielqgold

  • I’m new here
  • *
  • Posts: 17
  • Karma: 1
  • CiviCRM version: 3.3.1, 3.3.5, 3.4.5
  • CMS version: Drupal 6.22
Re: .log files...how often do they change out, how big can they get?
March 25, 2011, 03:59:39 am
It seems like turning off CiviCRM file-based logging if Drupal (database) Watchdog logging is turned on is the right way to go. Then you already have user-defined deletion here: /admin/settings/logging/dblog    That solves it for a Drupal install anyways.

While I appreciate that you want to delete logs every 30 days, Stoob, I don't think we should have that hardcoded. We should give the user flexibility via the web UI, don't you think?

I'm not sure how to throw an error so I can test the attached patch? What's a good way to make an error?  :)

mdlueck

  • Ask me questions
  • ****
  • Posts: 382
  • Karma: 4
  • CiviCRM version: 4.7.24
  • CMS version: Drupal 6.x
  • MySQL version: 5.5.54
  • PHP version: 5.3.10
Re: .log files...how often do they change out, how big can they get?
March 25, 2011, 09:54:42 am
Quote from: arielqgold on March 25, 2011, 03:59:39 am
I'm not sure how to throw an error so I can test the attached patch? What's a good way to make an error?  :)

Good next logical question!  :)

I am going to take on making the code adjustments to 3.3.5, but that was the one logical next question... some way to generate Civi log messages so I can test the code to make sure it works properly.
--
Michael Lueck
Lueck Data Systems
http://www.lueckdatasystems.com/

Pages: 1 [2]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • .log files...how often do they change out, how big can they get?

This forum was archived on 2017-11-26.