Page 1 of 2

Disable log

PostPosted: 27. November 2007 09:29
by dingbat
How to disable error log completely? I'm making stand-alone kiosk installation and found this as one thing should take care of. Error log complains about mysql-character set, but my app. is working just fine. So I could just stop logging.

I get acces-log disabled by commenting log_module out, but it didn't stop error-logs. Or if this is not possible, is there easy way to "rotate" logs in windows? I'm absolutely noob, so if you can answer, please make it simple :) Thanks!

PostPosted: 27. November 2007 09:53
by Izzy
If your talking about the Apache error.log then look for this in
xampp\apache\conf\httpd.conf file
Code: Select all
#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog logs/error.log

See if this stops it by commenting out the line like this
# ErrorLog logs/error.log

Save the file and restart Apache - always make a backup of .conf and .ini files before editing then if you make a typo and Apache fails to start you can then revert to the known good file.


===========================================
1. The new DeskTopXampp Launch Control for XAMPP / XAMPPlite
Posted by Ridgewood available from Ridgewood'sDTX web site

2. Build Rich AJAX Applications - Faster
TIBCO General Interface Pro Edition but FREE and Open Source
Fully working with NO donations required to get a user/password
===========================================

PostPosted: 27. November 2007 10:01
by dingbat
I think I tried that already, and it still logs errors?

PostPosted: 27. November 2007 10:18
by Izzy
dingbat wrote:I think I tried that already, and it still logs errors?

You didn't say you had tried that in your post.

What else have you tried?

Have you tried a Google search?

Have you tried a search of this forum?


===========================================
1. The new DeskTopXampp Launch Control for XAMPP / XAMPPlite
Posted by Ridgewood available from Ridgewood'sDTX web site

2. Build Rich AJAX Applications - Faster
TIBCO General Interface Pro Edition but FREE and Open Source
Fully working with NO donations required to get a user/password
===========================================

PostPosted: 27. November 2007 10:32
by dingbat
Yes, I didn't mention that, sorry. Actually I have now tried to comment out every log-related line in conf, but no result. Do you think it should stop error-logging too? Or is it always on?

And yes, I have googled and searched from this forum, but no help with this. I have learned that I could use rotation to archive logs, but haven't seen help how to do this in windows.

Edit: I also tried to lower the level of notfications in error.log, setting

Code: Select all
LogLevel emerg


It still produces this repeating error (propably with each request)

Code: Select all
File 'c:\mysql\share\charsets\?.conf' not found (Errcode: 2)
Character set '#48' is not a compiled character set and is not specified in the 'c:\mysql\share\charsets\Index' file

PostPosted: 27. November 2007 10:52
by Izzy
I am not sure if it is possible to disable the error log but all you need to do is delete the file error.log as Apache will recreate it when it has to.

Do this on a regular basis by what ever means at your disposal and the file will not get too big.


===========================================
1. The new DeskTopXampp Launch Control for XAMPP / XAMPPlite
Posted by Ridgewood available from Ridgewood'sDTX web site

2. Build Rich AJAX Applications - Faster
TIBCO General Interface Pro Edition but FREE and Open Source
Fully working with NO donations required to get a user/password
===========================================

PostPosted: 27. November 2007 11:01
by dingbat
Problem is that I should leave the machine place where is not continuing control. So I'm not near it all the time :(

I should have tell this too, in first place :)

PostPosted: 27. November 2007 11:07
by Izzy
dingbat wrote:Problem is that I should leave the machine place where is not continuing control. So I'm not near it all the time :(

I should have tell this too, in first place :)

http://www.wincron.net/

http://www.tomasello.com/software/wincron/


===========================================
1. The new DeskTopXampp Launch Control for XAMPP / XAMPPlite
Posted by Ridgewood available from Ridgewood'sDTX web site

2. Build Rich AJAX Applications - Faster
TIBCO General Interface Pro Edition but FREE and Open Source
Fully working with NO donations required to get a user/password
===========================================

PostPosted: 27. November 2007 11:26
by dingbat
Thanks. Looks quite spooky for me...

PostPosted: 27. November 2007 12:34
by Wiedmann
It still produces this repeating error (propably with each request)

If you are using PHP4 (or Perl), that's "normal".

How to disable error log completely?

That's not really a good idea. But using "nul" as filename for the error log should work.

PostPosted: 27. November 2007 12:50
by dingbat
Hey, I could test that. Yes, I have php 4 because cms I'm using needs that. Or to be more strict, one of the plugins need that. Thanks, I'll try nul. Or should it be null with double-l's?

BTW, I tried to find easier start-up software which would simply delete error.log after restart, but didn't find any which would do it always, not just once.

PostPosted: 27. November 2007 13:09
by dingbat
The "nul" seems to do that! Thank's a lot, you were both very kind!

PostPosted: 27. November 2007 13:56
by Wiedmann
I tried to find easier start-up software which would simply delete error.log after restart,

Scheduled tasks from Windows can do this.

PostPosted: 27. November 2007 23:01
by dingbat
Can they? I have never actually checked, I have always thought they can just drive scheduled programs or so.

PostPosted: 27. November 2007 23:08
by Wiedmann
they can just drive scheduled programs or so.

Programs like a batchfile with (example):
Code: Select all
@del \foo\bar\error.log
@sc start Apache2.2