Component Logging

    Logging messages output by a component are categorized by scopes. A scope represents a set of related log messages whichyou can control as a whole. Different components have different scopes, depending on the features the componentprovides. All components have the scope, which is used for non-categorized log messages.

    As an example, as of this writing, Mixer has 5 scopes, representing different functional areas within Mixer:

    • adapters
    • api
    • attributes
    • default

    Pilot, Citadel, and Galley have their own scopes which you can discover by looking at their reference documentation.

    • none
    • error
    • warning
    • info

    To control the output level, you use the —log_output_level command-line option. For example:

    In addition to controlling the output level from the command-line, you can also control the output level of a running componentby using its interface.

    Log messages are normally sent to a component’s standard output stream. The —log_target option lets you direct the output toany number of different locations. You give the option a comma-separated list of file system paths, along with the specialvalues stdout and to indicate the standard output and standard error streams respectively.

    Istio components can automatically manage log rotation, which make it simple to break up large logs into smaller log files.The —log_rotate option lets you specify the base file name to use for rotation. Derived names will be used for individuallog files.

    The —log_rotate_max_age option lets you specify the maximum number of days before file rotation takes place, while the —log_rotate_max_size optionlet you specify the maximum size in megabytes before file rotation takes place. Finally, the —log_rotate_max_backups option lets you controlthe maximum number of rotated files to keep, older files will be automatically deleted.

    The and —log_stacktrace_level options let you control whether log information includesprogrammer-level information. This is useful when trying to track down bugs in a component but is notnormally used in day-to-day operation.

    Describes how to use ControlZ to get insight into individual running components.