Server. XML (global settings)
<! -- Overall logging configuration. This section contains only information that is -->
<! -- That controls the overall logging behaviour. Specific logging configuration is -->
<! -- Global log configuration. This section only controls global log collection. The specific configuration file is included in -->
<! -- Logger. xml -->
<! -- Located in logger. xml. -->
<Logging>
<! -- The time field in a log file can be either in UTC (GMT) or local (default). -->
<! -- In terms of time, the log file is based on GMT (Greenwich Mean Time) or local time (local time by default) -->
<Time> Local </time>
<Access>
<! -- Whether access logging is enabled. -->
<! -- Enable server access log settings -->
<Enable> true </enable>
<! -- The logging scope determines whether a log file is written out for -->
<! -- Each vhost or just one for the entire server. It may be either server -->
<! -- Or vhost. -->
<! -- Determine the log range, whether to separately record each virtual host or only record the entire server. The option can be -->
<! -- Server or vhost -->
<Scope> server </scope>
</Access>
<Diagnostic>
<! -- Whether diagnostic logging is enabled. -->
<! -- Enable or disable log diagnosis settings -->
<Enable> true </enable>
</Diagnostic>
<Application>
<! -- Whether application logging is enabled. -->
<! -- Application Program Enable Logging settings -->
<Enable> true </enable>
</Application>
</Logging>
========================================================== ========================================================== ======
Logger. XML (specific settings of log files)
<Logger>
<Access>
<! -- This section configures the server to send log msgs to a -->
<! -- Remote logging server. To enable this feature, set the -->
<! -- "Enable" attribute to true. You can choose the type of -->
<! -- Connection to use by specifying the "type" attribute which -->
<! -- Can be set to either "UDP" or "TCP". Default is UDP. -->
<! -- This section configures the server to send log information to a remote log server. -->
<! -- Functions, you can set the "enable" attribute to "true". You can choose which connection to use -->
<! -- Connection method, which can be set to "UDP" or "TCP". The default value is UDP. -->
<Logserver enable = "false" type = "UDP">
<! -- Specify the IP and port of the server to log to. -->
<! -- Specify the IP address and port of the log server -->
<! -- For example, -->
<! -- <Hostport> XXX. XXX: 1234 <Hostport>
<! -- This is an identifier used to identify the server that -->
<! -- The log came from. By default, this is the IP address -->
<! -- Of this server. -->
<! -- This is used to set the source of the server in the log. The default value is this server. -->
<! -- IP address. -->
<Serverid> </serverid>
<! -- This specifies how many lines to log before including -->
<! -- The fields header again. -->
<Displayfieldsheader> 100 </displayfieldsheader>
</Logserver>
<! -- Directory in which log files will be placed, by default they are -->
<! -- Placed in logs/In the Server installation directory. -->
<! -- Log file storage path. By default, log files are stored in the logs directory under the root directory installed on the server -->
<Directory >$ {logger. logdir} </directory>
<! -- Access log file name, everything inside the square brackets will be -->
<! -- Substituted. -->
<! -- Y represents year, only YYYY is allowed -->
<! -- M represents month, only M or mm are allowed -->
<! -- D Represents day, only D or DD are allowed -->
<! -- N represents version, there is no limit on number of n -->
<! -- The number of each letter represents number of digits, for example -->
<! -- Using L in M is 4 and in mm is 04 -->
<! -- Access log name rules, which can be replaced by the following in square brackets -->
<! -- Y indicates a connection. Only YYYY is allowed. -->
<! -- M indicates the month. Only M or mm is allowed. -->
<! -- D indicates the day. Only D or DD is allowed. -->
<! -- N indicates the version number. Here there is no limit on the number of n -->
<! -- The number of each letter represents a number, for example -->
<! -- In December April, M indicates 4, MM indicates 04. -->
<FILENAME> access. [NN]. Log </FILENAME>
<! -- The time field in a log file can be either in UTC or local time. The -->
<! -- Setting here can be used to override the server-wide configuration, -->
<! -- See <logging> in server. xml. -->
<! -- The time field in the log can be set to UTC or local time. This setting can overwrite the server configuration -->
<! -- Global settings in the logging section -->
<Time> </time>
<Rotation>
<! -- Maximum file size in kilobytes (1024 bytes) -->
<! -- Set log rotation, and set the maximum file size of each log. -->
& Lt; maxsize & gt; 10240 & lt;/maxsize & gt;
<! -- Rotation time, there are 2 types -->
<! -- If type = "Daily", rotation only occurs every 24 hours, and the format -->
<! -- Is hh: Mm, for example 00:00 will rotates every midnight -->
<! -- If type = "duration", rotation occurs when the duration of the log -->
<! -- Exceed a certain length, duration takes a number in minutes -->
<! -- The cycle interval. Here there are two ways -->
<! -- If the method is "Daily", it is rotated every 24 hours. The following time parameter is hh: Mm, for example -->
<! -- Indicates a round robin at every day -->
<! -- If the method is "duration", it means to round-robin when it exceeds a certain period of time -->
<Schedule type = "Daily"> 00: 00 </schedule>
<! -- Max number of log files to keep, files will be named access1_1.log, -->
<! -- Access1_2.log, access1_3.log etc. -->
<! -- If the name of a log is access00001.log, access00003.log, and access00003.log, -->
<! -- Maximum number of storage -->
<History> 5 </Rotation>
<! -- The following describes which events to be logged. The varous events -->
<! -- Are as follows, -->
<! -- Event namecategory -->
<! -- ============================ -->
<! -- 1. Connect-pending session -->
<! -- 2. Connect session -->
<! -- 3. Disconnect session -->
<! -- 4. Publish stream -->
<! -- 5. unpublish stream -->
<! -- 6. Play stream -->
<! -- 7. Pause stream -->
<! -- 8. unpause stream -->
<! -- 9. Seek stream -->
<! -- 10. Stop stream -->
<! -- 11. Record stream -->
<! -- 12. recordstop stream -->
<! -- 13. Server-start server -->
<! -- 14. Server-Stop server -->
<! -- 15. vhost-start vhost -->
<! -- 16. vhost-Stop vhost -->
<! -- 17. app-Start application -->
<! -- 18. app-Stop Application -->
<! -- The desired events are specified as a semi-colon separated list. -->
<! -- Specifying * will log all events. -->
<! -- The following event behaviors will be recorded in the log. The time behaviors include: -->
<! -- Omitted -->
<! -- If it is specified as *, all event behaviors will be recorded -->
<Events> connect; disconnect; play; pause; unpause; stop </events>
<! -- The following describes what information gets logged for each event. -->
<! -- Not all fields make sense for all events in which case they will be -->
<! -- Empty in the log file. The possible fields are, -->
<! -- 1. X-event type of event -->
<! -- 2. x-category event category -->
<! -- 3. date at which the event occurred -->
<! -- 4. Time time at which the event occurred -->
<! -- 5. TZ time zone information -->
<! -- 6. x-CTX event dependant context information -->
<! -- 7. X-pid server process id -->
<! -- 8. X-CPU-load CPU load -->
<! -- 9. x-Mem-load memory load (as reported in getserverstats) -->
<! -- 10. X-adaptor name -->
<! -- 11. X-vhost name -->
<! -- 12. X-app application name -->
<! -- 13. X-appinst Application Instance name -->
<! -- 14. C-IP Client IP Address -->
<! -- 15. C-Proto connection protocol-rtmp or rtmpt -->
<! -- 16. S-Uri URI of the FMS Application -->
<! -- 17. C-referrer URI of the referrer -->
<! -- 18. C-User-Agent user agent -->
<! -- 19. C-client-ID Client ID -->
<! -- 20. CS-bytes transferred from client to server -->
<! -- 21. SC-bytes transferred from server to client -->
<! -- 22. X-sname stream name -->
<! -- 23. X-File-size stream size in bytes -->
<! -- 24. X-File-length stream length in seconds -->
<! -- 25. X-SPOs stream position -->
<! -- 26. CS-stream-bytes stream bytes transferred from client to server -->
<! -- 27. SC-stream-bytes stream bytes transferred from server to client -->
<! -- 28. S-ipip Address [es] of the server -->
<! -- 29. X-durationduration of an event/session -->
<! -- 30. X-statusstatus code -->
<! -- 31. CS-Uri-stem of S-Uri -->
<! -- 32. CS-Uri-query portion of S-Uri -->
<! -- 33. X-sname-query portion of stream URI -->
<! -- 34. X-File-name full file path of recorded stream -->
<! -- 35. X-File-ext stream type (FLV or mp3) -->
<! -- 36. X-Suri-querysame as X-sname-query -->
<! -- 37. X-Suri-stemcs-Uri-stem + X-sname + X-File-ext -->
<! -- 38. X-surix-Suri-stem + X-Suri-query -->
<! -- 39. X-SC-QoS-bytesbytes transferred from server to client for quality of service -->
<! -- The Field specification is a semi-colon separated list of one or more -->
<! -- And the special key word * indicates that all fields are to be logged. -->
<! -- When customizing the fields to be logged, It is stronugly recommended -->
<! -- To always at least log the type, category, date and time fields. -->
<! -- Which of the following information will be recorded in each event behavior, and not all information may be transferred to the log? -->
<! -- All parts may be blank in the log. -->
<! -- If it is specified as *, all event behaviors will be recorded -->
<Fields> X-category; X-event; date; time; X-pid; C-IP; CS-bytes; SC-bytes; X-sname; SC-stream-bytes; X-File-size; X-File-length </fields>
<! -- Delimiter is used to separate between fields -->
<! -- Recommended: tab or ''. If no Delimiter is specified, default is tab -->
<! -- Not recommended: '#', because it is used as comment tag in W3C format -->
<! -- Disallowed: ''', '"', '.', ':', '-', '\' and all alpha-numeric -->
<! -- (A-Z, A-Z, 0-9). character ':' and '-' are not allowed because ':' is -->
<! -- Used in the time field and '-' is used in the Date Field and fields -->
<! -- With empty value. -->
<Delimiter> </delimiter>
<! -- This is an optional flag to control if the fields need to be quoted -->
<! -- When space or delimiter are found in the fields. It can be set to -->
<! -- Enable or disable. By default, it is set to disable -->
<! -- This option requires reference to be enabled during control. The space key is found in the information field displayed in the log -->
<! -- Enable or disable -->
<Quotefields> disable </quotefields>
<! -- This is an optional flag to control if the fields need to be escaped -->
<! -- When unsafe characters are found in the fields. It can be set to -->
<! -- Enable or disable. By default, it is set to enable -->
<! -- Based on rfc1738, unsafe characters are space, <,>, ", #, %, {,}, |, -->
<! -- ^ ,~, [,], '-->
<Escapefields> enable </escapefields>
</Access>
<Diagnostic>
<! -- Directory in which log files will be placed, by default they are -->
<! -- Placed in logs/In the Server installation directory. -->
<! -- Path for storing diagnostic log files. The default log files are stored in logs under the root directory installed on the server. -->
<! -- Directory -->
<Directory >$ {logger. logdir} </directory>
<! -- The time field in a log file can be either in UTC or local time. The -->
<! -- Setting here can be used to override the server-wide configuration, -->
<! -- See <logging> in server. xml. -->
<! -- The time field in the log can be set to UTC or local time. This setting can overwrite the server configuration -->
<! -- Global settings in the logging section -->
<Time> </time>
<Rotation>
<! -- Maximum file size in kilobytes (1024 bytes) -->
<! -- Set log rotation, and set the maximum file size of each log. -->
& Lt; maxsize & gt; 10240 & lt;/maxsize & gt;
<! -- Rotation time, there are 2 types -->
<! -- If type = "Daily", rotation only occurs every 24 hours, and the format -->
<! -- Is hh: Mm, for example 00:00 will rotates every midnight -->
<! -- If type = "duration", rotation occurs when the duration of the log -->
<! -- Exceed a certain length, duration takes a number in minutes -->
<! -- The cycle interval. Here there are two ways -->
<! -- If the method is "Daily", it is rotated every 24 hours. The following time parameter is hh: Mm, for example -->
<! -- Indicates a round robin at every day -->
<! -- If the method is "duration", it means to round-robin when it exceeds a certain period of time -->
<Schedule type = "Daily"> 00: 00 </schedule>
<! -- Max number of log files to keep, files will be named admin1_1.log, -->
<! -- Admin1_2.log, admin1_3.log etc. -->
<! -- If the name of a log is access00001.log, access00003.log, and access00003.log, -->
<! -- Maximum number of storage -->
<History> 5 </Rotation>
</Diagnostic>
<Application>
<! -- Directory in which log files will be placed, by default they are -->
<! -- Placed in logs/In the Server installation directory. -->
<! -- Path for storing Application Log Files. By default, log files are stored in the root directory installed on the server. -->
<! -- Logs directory -->
<Directory >$ {logger. logdir} </directory>
<! -- The time field in a log file can be either in UTC or local time. The -->
<! -- Setting here can be used to override the server-wide configuration, -->
<! -- See <logging> in server. xml. -->
<! -- The time field in the log can be set to UTC or local time. This setting can overwrite the server configuration -->
<! -- Global settings in the logging section -->
<Time> </time>
<Rotation>
<! -- Maximum file size in kilobytes (1024 bytes) -->
<! -- Set log rotation, and set the maximum file size of each log. -->
& Lt; maxsize & gt; 10240 & lt;/maxsize & gt;
<! -- Rotation time, there are 2 types -->
<! -- If type = "Daily", rotation only occurs every 24 hours, and the format -->
<! -- Is hh: Mm, for example 00:00 will rotates every midnight -->
<! -- If type = "duration", rotation occurs when the duration of the log -->
<! -- Exceed a certain length, duration takes a number in minutes -->
<! -- The cycle interval. Here there are two ways -->
<! -- If the method is "Daily", it is rotated every 24 hours. The following time parameter is hh: Mm, for example -->
<! -- Indicates a round robin at every day -->
<! -- If the method is "duration", it means to round-robin when it exceeds a certain period of time -->
<Schedule type = "Daily"> 00: 00 </schedule>
<! -- Max number of log files to keep, files will be named -->
<! -- Applicationlogs 1.log, applicationlogs 2.log etc. -->
<! -- If the name of a log is access00001.log, access00003.log, and access00003.log, -->
<! -- Maximum number of storage -->
<History> 5 </Rotation>
</Application>
</Logger>