Logs implementation on SWS
==========================

Logs on sws are defined in two way access methods.

- Scriptable ( coding inside "exec" scripts )
- In-Core    ( Using accesLog() errorLog() functions )

Locks:
======
Screws implements a stick-bit method to lock the logs files.

This is a simple, fast and secure way to lock files, like a
mutex do. And permit more than one app access to the same
file without collisions.

The work is easy: Just set or unset the sticky bit:
$ chmod -t /var/log/access.log

If you see in `ps aux` a lot of process trying to write to the
log file, could be that log file is locked by one process hanged,
or just any malicious user that sets the sticky bit on the file.

To solve that, you could unset this bit, reset the correct
permisions(secure) and restart the daemon.

Another way is just enabling the directive "nolock" in the
configuration file.



Implementation:
===============
  %h - host (url to get)
  %i - remote_addr (IP)
  %I - remote_hostname (inversed resolution of IP)
  %t - time ( hex time )
  %d - human time (Wed...)
  %m - method
  %f - file to get
  %c - argc
  %n - newline

  As you see is very similar as apache do:

  Now you can define the logstr directive by this way:

  whitespace _
  logstr RemoteIP:_%i__Date:_%d__[_%m_%f_%c_]

  Or just customize as you want ;)

Files:
======
Log files are defined by directives "logfile" and "errfile"
