| View previous topic :: View next topic |
| Author |
Message |
Anonymous Guest
|
Posted: Thu Jun 19, 2008 7:33 pm Post subject: How do I Stop Icecast2 from writing an “access.log” file?? |
|
|
I’m doing a experiment with a old laptop and want to replace its hard drive with a Compact Flash card with IDE Adapter.
I read on the web that the Compact Flash Cards have a limited number of Writes till it fails.
I ran Filemon to see who writes to the hard drive the most and Icecast2’s “access.log” files Wins 1st place!
How do I Stop Icecast2 from writing an “access.log” file??
I don’t need the file and it grows very big over time.
Thanks |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Thu Jun 19, 2008 9:05 pm Post subject: |
|
|
This was asked before and I mentioned that you should refer to the file /dev/null so that the content is not retained.
karl. |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Fri Jun 20, 2008 2:04 am Post subject: |
|
|
| karlH wrote: |
This was asked before and I mentioned that you should refer to the file /dev/null so that the content is not retained.
karl. |
Hello Karl,
Yes But?
<logging>
<accesslog>access.log</accesslog>
<errorlog>error.log</errorlog>
<!-- <playlistlog>playlist.log</playlistlog> -->
<loglevel>1</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
<logsize>0</logsize> <!-- Max size of a logfile -->
<!-- If logarchive is enabled (1), then when logsize is reached
the logfile will be moved to [error|access|playlist].log.DATESTAMP,
otherwise it will be moved to [error|access|playlist].log.old.
Default is non-archive mode (i.e. overwrite)
-->
<!-- <logarchive>1</logarchive> -->
</logging>
Where in the Above to i PLace the /dev/null??
Thanks Again for your Help! |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Fri Jun 20, 2008 2:20 am Post subject: |
|
|
Either create a symbolic link from access.log to /dev/null or make logdir be /dev with the accesslog and errorlog set to null.
karl. |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Fri Jun 20, 2008 4:42 am Post subject: |
|
|
| karlH wrote: |
Either create a symbolic link from access.log to /dev/null or make logdir be /dev with the accesslog and errorlog set to null.
karl. |
Karl Don’t get mad, But what you are saying is Greek to me, I’m not a Programmer.
I can throw ln -s and /dev/null all over the place, but most likely get errors, do to Wrong placement. And having No clue. P.S. I’m also assuming the below is the area that makes the Access.log file)
Below is what I have to work with:
Below came from the Icecast.xml File
<logging>
<accesslog>access.log</accesslog>
<errorlog>error.log</errorlog>
<!-- <playlistlog>playlist.log</playlistlog> -->
<loglevel>1</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
<logsize>0</logsize> <!-- Max size of a logfile -->
<!-- If logarchive is enabled (1), then when logsize is reached
the logfile will be moved to [error|access|playlist].log.DATESTAMP,
otherwise it will be moved to [error|access|playlist].log.old.
Default is non-archive mode (i.e. overwrite)
-->
<!-- <logarchive>1</logarchive> -->
</logging>
Can you please Place the /dev/null and In –s in the proper places in the above? So the Access.log will not be made.
Again Sorry if I don’t understand you’re Programming language |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Fri Jun 20, 2008 4:58 am Post subject: |
|
|
I'm not quite sure where you are getting the programming reference from, I've already said what you should put in both <logdir> and <accesslog> and <errorlog> but you haven't said whether you have or not.
The symbolic link approach is just an alternative. icecast refers to a file for logging but really it's just a reference to the /dev/null file. It really isn't any more complicated than that.
karl. |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Fri Jun 20, 2008 6:12 am Post subject: |
|
|
| karlH wrote: |
I'm not quite sure where you are getting the programming reference from, I've already said what you should put in both <logdir> and <accesslog> and <errorlog> but you haven't said whether you have or not.
The symbolic link approach is just an alternative. icecast refers to a file for logging but really it's just a reference to the /dev/null file. It really isn't any more complicated than that.
karl. |
OK I Start Icecast2 Win32 From my Computer Desktop by click on its Icon.
Once it is open I click on "Stop Server", then I click "Configuration then Edit Configuration".
Notepad opens up and I see what’s inside the file icecast.xml, I scroll down almost to the bottom and I see an area that talks about "access.log" and it looks like this:
<logging>
<accesslog>access.log</accesslog>
I change it to :
<logging>
<accesslog>/dev/null</accesslog>
And I save it, then Click Start Server.
A pop up window pops up and says, Error "FATAL: could not open access logging (./logs\/dev/null): No such file or directory
I click OK and another Pop up comes up saying "FATAL: Could not start logging"
I click ok to that and one more pop up comes up
"Icecast2win MFC Application has encountered a problem and needs to close." Or “Error unable to start server”
Then I try
<logging>
<accesslog>access.log /dev/null</accesslog>
And get same error
I tried:
<logging>
<accesslog>access.log > /dev/null</accesslog>
And get same error
I tried:
<logging>
<accesslog>access.log </accesslog> /dev/null
It ran this time! But still made the access.log file on the hard drive
Then I tried a different area:
<logdir>./log<logdir>
I change it to
<logdir>./dev/null<logdir>
It FAILed also.
Do you understand now what I am going thru?
It’s an endless fail cycle. Because I don’t know where to place the /dev/null at.
You say “It really isn't any more complicated than that.” Well it is to me!
 |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Fri Jun 20, 2008 7:03 am Post subject: |
|
|
If you had mentioned win32 before then you wouldn't be wasting time. There is no /dev directory on windows. I'm not sure if you can do something similar on windows, you could try the special filename of NUL in the accesslog and errorlog.
Let me be clear, I mean something like <accesslog>nul</accesslog>
karl. |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Fri Jun 20, 2008 3:06 pm Post subject: |
|
|
| karlH wrote: |
If you had mentioned win32 before then you wouldn't be wasting time. There is no /dev directory on windows. I'm not sure if you can do something similar on windows, you could try the special filename of NUL in the accesslog and errorlog.
Let me be clear, I mean something like <accesslog>nul</accesslog>
karl. |
MY bad I Assumed win32 (kicks self in head)
I tried
<accesslog>nul</accesslog>
and
THat Worked!! no more Logs!! YAY!!!
Next Log file to go after was dsp_oddcast_v3.log
In its Config File I set to null and the bastared started making null.log files!
So I changed it to /dev/null and now it Stopped making Log Files!!! YAY!
Thank You!! |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Fri Jun 20, 2008 3:44 pm Post subject: |
|
|
careful with the naming. I said nul (1'ell) because on windows it's a reserved name like prn, con, lpt1 etc. I don't know what oddcast does in regard to logs but it may be trying to open, failing then continuing, whether that means logging is disabled I can't say.
karl. |
|
| Back to top |
|
 |
|