MethodLog#

class libcasm.monte.MethodLog(
self: MethodLog,
logfile_path: str | None = None,
log_frequency: SupportsFloat | SupportsIndex | None = None,
)#

Bases: pybind11_object

Logger for Monte Carlo method status

Constructor

Parameters:
  • logfile_path (Optional[str]) – File location for log output. If None, log to stdout.

  • log_frequency (Optional[float]) – How often to log method status, in seconds

Methods

begin_lap(…)

Begin a new lap.

begin_section_print_always(…)

Begin a section which always prints, for every verbosity_level.

begin_section_print_if_debug(…)

Begin a section which only prints if verbosity_level >= "debug".

begin_section_print_if_quiet(…)

Begin a section which only prints if verbosity_level >= "quiet".

begin_section_print_if_standard(…)

Begin a section which only prints if verbosity_level >= "standard".

begin_section_print_if_verbose(…)

Begin a section which only prints if verbosity_level >= "verbose".

decrease_indent(…)

Decrease indent level.

end_section(…)

End the current section.

hide_clock(…)

Do not show time as a part of section headings.

increase_indent(…)

Increase indent level.

indent_str(…)

The current indent string.

lap_time(…)

Time in seconds since begin_lap.

log_frequency(…)

How often to log method status, in seconds

logfile_path(…)

File location for log output

paragraph(…)

Print with indent, line wrapping, and justification.

paragraph_justification(…)

Return paragraph justification type.

paragraph_width(…)

Return paragraph width.

print(…)

Print with indent.

reset(…)

Reset log file, creating parent directories as necessary

reset_to_stdout(…)

Reset to print to stdout.

restart_clock(…)

Restart internal timer.

section(…)

Print a nicely formatted section header, optionally with the current timer value.

set_debug(…)

Set to "debug" printing mode.

set_indent_space(…)

Set the number of spaces per indent level.

set_initial_indent_space(…)

Set an initial number of indent spaces, before applying indent levels.

set_paragraph_justification(…)

Set paragraph justification type.

set_paragraph_width(…)

Set paragraph width.

set_quiet(…)

Set to "quiet" printing mode.

set_standard(…)

Set to "standard" printing mode.

set_verbose(…)

Set to "verbose" printing mode.

show_clock(…)

Show time_s as a part of section headings.

time_s(…)

Time in seconds since construction or restart_clock.

verbatim(…)

Print with indent and line wrapping, without justification.