Commit Graph
22 Commits
Author SHA1 Message Date
ac-stef daf4b9d24a add server parameters for statistic and diagnostic purposes
Logged server parameters are checked for changes once a minute. If a
change is detected, it is logged.
2017-06-27 15:15:23 +02:00
ac-stef 035d7caf2f thread-safe and fully buffered logging
Uses own thread to actually write to logs, so the main thread can't be
blocked by a slow logfile. Log entries are buffered in two ringbuffers,
one for the main thread and one for all other threads. The main thread
will copy the second buffer to the main buffer periodically. The main
thread buffer is read from the log worker thread.

Since two buffers are kept, there are now several functions to add a log
entry:

  mlog()
    for main thread functions only: will never block

  tlog()
    other threads only: may block, until main thread copied some entries

  xlog()
    automatically determines, which thread it's been called from and
    then writes to the proper buffer (will block accordingly)

To avoid improper usage, mlog and tlog verify, if they are used correctly.
(Only for debug builds. An assert triggers, if necessary.)
2017-06-27 15:15:23 +02:00
ac-stef dd295bb54a initialise server parameters from commandline
overwrite defaults with commandline parameters before first use
(log level settings used as an example)
2017-06-27 15:15:23 +02:00
ac-stef 1c109bfa62 new commandline parameter to specify path for server logfiles
use -H to set path
default is logs/
2017-06-27 15:15:21 +02:00
ac-stef 1d1230544b speed up logging
don't bother processing a line, if the level is too high for any queue
2017-06-27 15:15:21 +02:00
ac-stef 007632ed77 clean up logging
especially restrict the constant flushing to debug mode
2015-02-08 17:39:14 +01:00
ac-stef a0286d2b3f replace textfilter functions with one-fits-all version
* replaces filtertext() with a version with a dozen of single filters
  that can be used in any combination
* defines classes of allowed characters for strings for various uses
  (see protocol.h line 153ff)
* now the allowed charset of, for example, player names is defined
  in one location only
* fixes issue #58
2014-05-24 12:59:19 +02:00
Lee Salzman e725e5ed8c string function cleanups
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4714 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-11-07 22:44:32 +00:00
Lee Salzman 54cc44c3db revising pch setup
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4690 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-11-07 06:42:37 +00:00
ac_stef 2d447bfb8e syslog support for windows and mac
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4495 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-06-10 17:49:42 +00:00
ac_stef be3ab39a36 log logging settings
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4467 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-06-03 14:30:52 +00:00
ac_stef 7ec8634727 cleanup
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4460 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-06-02 22:22:24 +00:00
ac_stef 374507babf all new logging: optional file log for linux; choose independent logging levels; optional timestamps for console & file logs; cleanup time functions
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4449 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-05-29 16:30:55 +00:00
ac_stef fab474de62 no spaces inside syslog idents
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4317 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-04-04 22:43:08 +00:00
ac_stef 0b2df7317c new server commandline parameter to choose syslog facility
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4149 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2009-01-26 14:00:47 +00:00
Lee Salzman a0f6c067fe warning fixes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3497 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-11-15 00:14:25 +00:00
Lee Salzman dc25037c9b filtertext fixes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2905 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-10-10 23:20:39 +00:00
driAn f2c0d13d2c log more info, filelog fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1955 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-05-13 21:48:52 +00:00
driAn 55d194edb7 log fixes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1954 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-05-13 21:24:12 +00:00
driAn 5619e04cba syslog support for AC on linux (default)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1953 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-05-13 20:48:17 +00:00
driAn b8cb9b64bc gcc compile fixes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1952 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-05-13 19:54:10 +00:00
driAn 9bb83edae7 very basic file-based server logger (no syslog yet) / WIP
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1941 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2008-05-12 20:41:24 +00:00