beamlime.logging.formatters.LogColumn#
- class beamlime.logging.formatters.LogColumn(variable_name, min_length=None, title=None, style='{')[source]#
Single column of each log.
- Parameters:
variable_name (
str
) – Name of the variable in formatter.min_length (
Optional
[int
], default:None
) – Minimum length of the column. Default is None.title (
Optional
[str
], default:None
) – Title of the column in header line. Capitalizedvariable_name
if None.style (
Literal
['{'
,'%'
], default:'{'
) – Formatting style.
Examples
>>> from beamlime.logging.formatters import LogColumn >>> time_column = LogColumn(variable_name='asctime', ... min_length=8, title='TIME', style='{') >>> time_column.formatter '{asctime:8}' >>> time_column.title 'TIME' >>> app_name_column = LogColumn(variable_name='app_name', ... title='APPLICATION', style='{') >>> app_name_column.formatter '{app_name}' >>> app_name_column.title 'APPLICATION'
- __init__(variable_name, min_length=None, title=None, style='{')#
Methods
__init__
(variable_name[, min_length, title, ...])format
()Attributes
formatter
min_length
style
title
variable_name