Commands/Lua

Reference for console commands, Lua hooks and Lua commands in CS2D.

CS2D Command CS2D Console Commands

Category: security (15)

CS2D Command logbatch

Categories

Parameters

  • lines (1-300): number of lines which will be batched for writing (default 50)

Info

High Security Relevance
This setting is important for the security of your server!
Use it carefully! Wrong settings may make your server vulnerable or limit its functionality or accessibility!

Controls the logging behavior by batching multiple lines for writing. Writing data to a physical medium is expensive so CS2D allows to batch multiple lines and to write them together in order to decrease FPS drops caused by slow drive access.

CS2D can batch 1 to 300 lines. 1 means, that every logged line will be written to the underlying physical medium (HDD, SSD, ...) instantly. A value >1 means, that CS2D will batch that many lines and will only write them once the given number is reached or once CS2D is closed. It may also write batched lines earlier in certain situations. The default value is 50 (recommended under normal circumstances).

Note: Note that log writing is also affected by the setting logmaxflushrate.

Attention: Batched log lines will get lost when CS2D crashes before writing them. Set this setting to 1 if you want to find the reason for a crash.

Attention: A low value may have a negative impact on the performance of your server and also the entire system it is running on. A known attack used to crash CS2D servers is to cause as much logging output as possible in order to slow down the system. Set this setting to a high value when you experience such problems.

Lua Hook Lua Hooks

Lua Command Lua Commands