hpcflow.sdk.log.AppLog#

class hpcflow.sdk.log.AppLog(app, log_console_level=None)#

Bases: object

Application log control.

Methods

add_file_logger

Add a log file.

remove_file_handlers

Remove all file handlers.

update_console_level

Set the logging level for console messages.

Attributes

DEFAULT_LOG_CONSOLE_LEVEL

Default logging level for the console.

DEFAULT_LOG_FILE_LEVEL

Default logging level for log files.

app

The application context.

logger

The base logger for the application.

console_handler

The handler for directing logging messages to the console.

Parameters:
  • app (BaseApp) –

  • log_console_level (str | None) –

DEFAULT_LOG_CONSOLE_LEVEL: ClassVar = 'WARNING'#

Default logging level for the console.

DEFAULT_LOG_FILE_LEVEL: ClassVar = 'INFO'#

Default logging level for log files.

add_file_logger(path, level=None, fmt=None, max_bytes=None)#

Add a log file.

Parameters:
  • path (Path) –

  • level (str | None) –

  • fmt (str | None) –

  • max_bytes (int | None) –

Return type:

Handler

app#

The application context.

console_handler#

The handler for directing logging messages to the console.

logger#

The base logger for the application.

remove_file_handlers()#

Remove all file handlers.

Return type:

None

update_console_level(new_level)#

Set the logging level for console messages.

Parameters:

new_level (str) –

Return type:

None