User Tools

Site Tools


cookbooks:devel:core

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
cookbooks:devel:core [2021/08/28 08:02]
jih
cookbooks:devel:core [2021/11/23 17:31]
miconda [maxbuffer]
Line 1378: Line 1378:
 ==== maxbuffer ==== ==== maxbuffer ====
  
-The size in bytes not to be exceeded during the auto-probing procedure of descovering the maximum buffer size for receiving UDP messages. Default value is 262144.+The size in bytes not to be exceeded during the auto-probing procedure of discovering and increasing the maximum OS buffer size for receiving UDP messages (socket option SO_RCVBUF). Default value is 262144.
  
 Example of usage: Example of usage:
Line 1384: Line 1384:
     maxbuffer=65536     maxbuffer=65536
  
 +Note: it is not the size of the internal SIP message receive buffer.
 ==== max_branches ==== ==== max_branches ====
  
Line 3949: Line 3950:
       * **A** - do not add log prefix       * **A** - do not add log prefix
       * **c** - add Call-ID (when available) as a dedicated JSON attribute       * **c** - add Call-ID (when available) as a dedicated JSON attribute
 +      * **j** - the log prefix and message fields are printed in JSON structure format, detecting if they are enclosed in between **{ }** or adding them as a **text** field
       * **M** - strip EOL ('\n') from the value of the log message field       * **M** - strip EOL ('\n') from the value of the log message field
       * **N** - do not add EOL at the end of JSON document       * **N** - do not add EOL at the end of JSON document
 +      * **p** - the log prefix is printed as it is in the root json document, it has to start with comma (**,**) and be a valid set of json fields
 +      * **U** - CEE (Common Event Expression) schema format - https://cee.mitre.org/language/1.0-beta1/core-profile.html
  
 Example of JSON logs when running Kamailio with "**--log-engine=json:M**" : Example of JSON logs when running Kamailio with "**--log-engine=json:M**" :
Line 3958: Line 3962:
  
 { "idx": 1, "pid": 18239, "level": "DEBUG", "module": "core", "file": "core/socket_info.c", "line": 644, "function": "grep_sock_info", "logprefix": "{1 1 OPTIONS 715678756@192.168.188.20} ", "message": "checking if host==us: 9==9 && [127.0.0.1] == [127.0.0.1]" } { "idx": 1, "pid": 18239, "level": "DEBUG", "module": "core", "file": "core/socket_info.c", "line": 644, "function": "grep_sock_info", "logprefix": "{1 1 OPTIONS 715678756@192.168.188.20} ", "message": "checking if host==us: 9==9 && [127.0.0.1] == [127.0.0.1]" }
 +</code>
  
 +Example config for printing log message with **j** flag:
 +
 +<code>
 +xinfo("{ \"src_ip\": \"$si\", \"method\": \"$rm\", \"text\": \"request received\" }");
 +</code>
 +
 +Example config for printing log messages with **p** flag:
 +
 +<code>
 +log_prefix=", \"src_ip\": \"$si\", \"tv\": $TV(Sn), \"mt\": $mt, \"ua\": \"$(ua{s.escape.common})\", \"cseq\": \"$hdr(CSeq)\""
 </code> </code>
cookbooks/devel/core.txt ยท Last modified: 2022/04/11 17:10 by bkaufman