Skip to content
Snippets Groups Projects
user avatar
Matt Jordan authored
When Asterisk is part of a larger distributed system, log files are often
gathered using tools (such as logstash) that prefer to consume information
and have it rendered using other tools (such as Kibana) that prefer a
structured format, e.g., JSON. This patch adds support for JSON formatted
logs by adding support for an optional log format specifier in Asterisk's
logging subsystem. By adding a format specifier of '[json]':

full => [json]debug,verbose,notice,warning,error

Log messages will be output to the 'full' channel in the following
format:

{
  "hostname": Hostname or name specified in asterisk.conf
  "timestamp": Date/Time
  "identifiers": {
    "lwp": Thread ID,
    "callid": Call Identifier
  }
  "logmsg": {
    "location": {
      "filename": Name of the file that generated the log statement
      "function": Function that generated the log statement
      "line": Line number that called the logging function
    }
    "level": Log level, e.g., DEBUG, VERBOSE, etc.
    "message": Actual text of the log message
  }
}

ASTERISK-25425 #close

Change-Id: I8649bfedf3fb7bf3138008cc11565553209cc238
2d7a4a33
History
Asterisk Reference Documentation
--------------------------------

1) To generate a PDF from this documentation, you will need the rubber tool,
   and all of its dependencies.  The web site for this tool is:

      http://www.pps.jussieu.fr/~beffara/soft/rubber/

   Then, once this tool is installed, running "make pdf" will generate
   the PDF automatically using this tool.  The result will be asterisk.pdf.

   NOTE:  After installing rubber, you will need to re-run the top level
   configure script.  It checks to see if rubber is installed, so that the
   asterisk.pdf Makefile target can produce a useful error message when it is
   not installed.

2) To generate HTML from this documentation, you will need the latex2html tool,
   and all of its dependencies.  The web site for this tool is:

      http://www.latex2html.org/

   Then, once this tool is installed, running "make html" will generate the
   HTML documentation.  The result will be an asterisk directory full of
   HTML files.