Hi all;

we have searched for the answer but still cannot figure out.

From admin, we can see that the error log, search, user access, and lotsa info piling up.

From admin/settings, we can see the option here:
Error reporting:
Where Drupal, PHP and SQL errors are logged. On a production server it is recommended that errors are only written to the error log. On a test server it can be helpful to write logs to the screen.
Discard log entries older than:
The time log entries should be kept. Older entries will be automatically discarded. Requires crontab.*****

So we have searched for `crontab' but.....

Is this the same as the cron?
http://mydomain.com/cron.php
There are two ways - either set the cron interval from domain control panel, or just use the web browser and type in the URL to the cron.php

Cron.php serves only as the indexing for the search function, right? What about the `discard older entries in the log'? It's not the crontab or is it?

So the main question is:
How to delete ERROR LOG which is piling up - so far we have 9 pages of them.

Or do we have to delete them from the database (using PHPMyAdmin?)

Comments

wellsy’s picture

whenever you wish.

It does all the housekeeping stuff for you including all the log information.

Note: you can choose how long to keep log information.

EDIT: but it still needs cron.php to be run.

wellsy

orchidsonline.com.au

Muslim guy’s picture

Thanks wellsy.

Chose to be 2 weeks.

The cron.php is run manually everytime a new article is created.

Do you mean the cron.php need to be edited something in the commands?

Please enlighten more :)

wellsy’s picture

(which is an automated call on your webserver to run things like cron.php)

then you need to run it manually yourself when you want things like the search database to be updated

cron.php stimulates drupal to do all the things which your website requires at that time

Note: no editing required

wellsy

orchidsonline.com.au

alliax’s picture

Why not use the poormanscron module ?!?..
It will automate this process, I don't see any advantages in running cron.php manually, be lazy please !

pulsifer’s picture

Or do we have to delete them from the database (using PHPMyAdmin?)

empty the table called "watchdog"

Muslim guy’s picture

I found it at http://drupal.org/node/43373

Thanks wellsy, now I want to try it. (Dropping the watchdog table)

Does it only delete the error log, or does it also delete other log (searc/user access etc)?

++++++++++++++++++++++++++++++++++++++++++++
maybe you could try this if you have access to phpMyAdmin
wellsy - January 5, 2006 - 09:15

open your database in phpMyAdmin

First step....backup your database! (Export>>>Select All tables>>>Structure and Data)

Then....Browse the watchdog table>>>choose to DROP the watchdog table

Then>>>>copy and paste the below into the SQL window and hit GO (for 4.6.3 or 4.6.4 or 4.6.5 database)

The table will be rebuilt with no content

++++++++++++++++++++++++++++++++++++++++++++++
No more queries
Heine - January 5, 2006 - 09:20

No more queries for today. At least; I hope it's for today...

You can also choose Empty or TRUNCATE TABLE `watchdog`

Muslim guy’s picture

OK I go with the EMPTY watchdog table, to be safe than sorry :)

The DROP and `rebulit with no content' sounds risky!

I have also installed poormanscron, to join the `lazy club'

Thanks folks :)

wellsy’s picture

The DROP is only required if the watchdog table becomes corrupted for whatever reason.

You need to CREATE it using the correct sql after that though.

OR Use the below to DROP it and then go on to CREATE it (for 4.6)

#
# Table structure for table `watchdog`
#

DROP TABLE IF EXISTS watchdog;
CREATE TABLE watchdog (
wid int(5) NOT NULL auto_increment,
uid int(10) NOT NULL default '0',
TYPE varchar(16) NOT NULL default '',
message longtext NOT NULL,
severity int(5) NOT NULL default '0',
link varchar(255) NOT NULL default '',
location varchar(128) NOT NULL default '',
hostname varchar(128) NOT NULL default '',
timestamp int(11) NOT NULL default '0',
PRIMARY KEY (wid)
) TYPE=MyISAM;

wellsy

orchidsonline.com.au

Muslim guy’s picture

Thankx again Wellsy

I emptied the wathcdog in 3 of my databases

Then I click `SQL'

Then copy and paste the CREATE stuff you posted above.

Whew, checked to see that no error log anymore but search log is kept. That's useful to keep the search and user access logs

wellsy’s picture

BTW the sql above can all be run in the same operation

IE: Drop...blah blah...Create...the rest..finished

You need the search and access logs to stay intact OR just kept up to date by running cron (by whatever means)

wellsy

orchidsonline.com.au