Media Flow Controller CLI Commands : logging

logging
Configure event logging. See “System Logging Options” on page 95 for task details.
Note! These settings configure the system log (syslog) that records all system activity such as user logins, configuration changes, and system condition changes. It does not record service activity or errors. The Media Flow Controller errorlog records service related errors but is mostly useful for debugging by Juniper Networks Support. Media Flow Controller provides several service-specific logs, detailed in Chapter 5, “Media Flow Controller Fault Management.”
logging
fields seconds enable [fractional-digits<integer> | whole-digits<integer>]
files
delete {current | oldest [<number_of_files_to_delete>]}
rotation
criteria {frequency<frequency>| size<megabytes>| size-pct<percentage>}
force
max-num <max_number_of_files_to_keep>
upload {current | 1 | 2} {<URL | <SCP>} [</filename>]
format
standard
welf [fw-name <firewall_name>]
level cli commands {<severity_level> | none}
local
override [class <class> priority {<severity_level> | none}] {<severity_level> | none}
recieve
trap {<severity_level> | none}
<IP_address>
trap
override [class <class> priority {<severity_level> | none}]
<severity_level>
Notes:
fields seconds—Include an additional field in each log message that shows the number of seconds since the Epoch; default is disabled. This is independent of the standard syslog datetime at the beginning of each message in the format "Feb 25 18:00:00". Aside from indicating the year at full precision, its main purpose is to provide subsecond precision. The precision can be controlled with the two ?digits commands described below. Note that except for the year, all of these digits are redundant with syslog's own datetime.
enable—Enable the seconds field. Use no logging fields enable to disable.
fractional-digits—Control the number of digits to the right of the decimal point; options are 1, 2, 3, and 6; which specify how many digits to the right of the decimal point to use. Truncation is done from the right, so you always get the <n> most significant digits.
whole-digits—Control the number of digits to the left of the decimal point; options are 1, 6, and all (do not limit the number of digits to the left of the decimal point). Truncation is done from the left, so you always have the <n> least significant digits. Note that except for the year, all of these digits are redundant with syslog's own datetime.
files—Manage log files.
delete—Delete log files:
current—Delete all current log files.
oldest—Force immediate deletion of the specified number of oldest local log files.
rotation—Configure automatic rotation of local logging files.
criteria—Configure what criteria decides when to automatically rotate local log files on local persistent storage. There are three mutually exclusive options:
-
frequency—Rotate based on time: daily (at midnight), weekly, or monthly (first day, at midnight). Default is daily.
-
size—Rotate log files that pass the specified size threshold.
-
size-pct—Rotate logs that pass the specified disk percentage.
If a size criteria is chosen, the file size is checked hourly, so if it passes the threshold in the middle of the hour it is not rotated right away.
force—Force an immediate rotation of the local log files. This does not affect the schedule of auto-rotation if it was done based on time: the next automatic rotation still occurs at the same time it was previously scheduled. Naturally, if the auto-rotation was based on size, this delays it somewhat as it reduces the size of the active log file to zero.
max-num—Configure how many old local log files to keep. If the number of log files ever exceeds this number (either at rotation time, or when this setting is lowered), the system deletes as many as necessary, starting with the oldest, to bring it down to this number. Default is 10.
upload—Upload a local log file to a remote host (specified with URL or scp path); specify which (available ) log file first:
current—The current log file.
1—Archived, compressed log file "messages.1.gz".
2—Archived, compressed log file "messages.2.gz".
To specify an archived log file, give its number as displayed by show log files. Note the current log file has the name "messages" if you don't specify a new name for it in the upload URL. The archived log files have the name "messages.<n>.gz" if you don't specify a new name in the URL, and are compressed with gzip regardless. See the “Command Arguments Key” on page 161 for the scp URL format and requirements.
format—Set log messages format. The no variant resets the format to default (standard), whether or not welf is used with it. Arguments:
standard (default)—Squid standard format.
welf—Web trends Enhanced Log Format. Use fw-name to specify the firewall name that should be associated with each message logged in WELF format. If no firewall name is set, the hostname is used by default. Use no logging format welf fw-name to delete.
level cli commands—Set the severity level at which user-executed CLI commands are logged. Default is notice. See logging severity level, next for details.
local—Set local logging options.
override—Enable, and add or delete (with no) a per-class override on the logging level. All classes that do not have an override use the global logging level set with logging local <severity_level>. Use no logging local override to disable all class-specific overrides to the local log level. Default is enabled. The no variant that disables them leaves them in configuration, but disables them so the logging level for all classes is determined by the global setting. Use the class argument to divide log messages according to their origin. The default classes are mgmt-core (for mgmtd alone), mgmt-back (for other back end components), and mgmt-front (for front end components, utilities, and tests).
<severity_level>—Set the minimum severity of log messages to be saved on local persistent storage, also applies to log messages originating from other hosts; or use none to disable local logging (you can also use no logging local). See logging severity level, next for details. Default is notice.
recieve—Allow this system to receive log message from another host. Default is disabled. If enabled, only log messages matching or exceeding the severity specified with logging local <severity_level> are logged, regardless of what is sent from the remote host. Use no logging receive to disable.
trap <severity_level>—Set minimum severity of log messages sent to syslog servers. This sets both the default for new servers, as well as the setting for all existing servers. The no variant sets the level to none, disabling logging to remote servers altogether (though the list of servers is not erased). This command does not affect console or local logging. See logging severity level, next for details.
<IP_address>—Send syslog messages to the specified remote syslog server. Hostnames are not allowed. Use no logging <IP_address> to stop. Use the trap option (set minimum severity of log messages sent to the specified server) arguments, override, and <severity_level>, as described above for logging local.

Report an Error
Media Flow Controller Administrator's Guide and CLI Command Reference
Copyright © 2010 Juniper Networks, Inc.