logging

New in version 0.40.0.

logging Module

ooodev.io.log.logging.debug(msg, *args, **kwargs)[source]

Logs debug message.

Parameters:
  • msg (Any) – message to debug.

  • args (Any, optional) – arguments.

  • kwargs (Any) –

Keyword Arguments:
  • exc_info – (_ExcInfoType): Exc Info Type Default to None

  • stack_info (bool) – Stack Info. Defaults to False.

  • stacklevel (int) – Stack Level. Defaults to 1.

  • extra (Mapping[str, object], None) – extra Defaults to None.

Return type:

None

Returns:

None

ooodev.io.log.logging.debugs(*messages)[source]

Log Several messages debug formatted by tab.

Parameters:

messages (Any) – One or more messages to log.

Return type:

None

ooodev.io.log.logging.error(msg, *args, **kwargs)[source]

Logs Error message.

Parameters:
  • msg (Any) – message to debug.

  • args (Any, optional) – arguments.

  • kwargs (Any) –

Keyword Arguments:
  • exc_info – (_ExcInfoType): Exc Info Type Default to None

  • stack_info (bool) – Stack Info. Defaults to False.

  • stacklevel (int) – Stack Level. Defaults to 1.

  • extra (Mapping[str, object], None) – extra Defaults to None.

Return type:

None

Returns:

None

ooodev.io.log.logging.get_log_level()[source]

Get the log level.

Returns:

The log level.

Return type:

int

ooodev.io.log.logging.info(msg, *args, **kwargs)[source]

Logs info message.

Parameters:
  • msg (Any) – message to debug.

  • args (Any, optional) – arguments.

  • kwargs (Any) –

Keyword Arguments:
  • exc_info – (_ExcInfoType): Exc Info Type Default to None

  • stack_info (bool) – Stack Info. Defaults to False.

  • stacklevel (int) – Stack Level. Defaults to 1.

  • extra (Mapping[str, object], None) – extra Defaults to None.

Return type:

None

Returns:

None

ooodev.io.log.logging.infos(*messages)[source]

Log Several messages info formatted by tab.

Parameters:

messages (Any) – One or more messages to log.

Return type:

None

ooodev.io.log.logging.save_log(path, data)[source]

Save data in file, data append to end and automatic add current time.

Parameters:
  • path (Any) – PathLike path such a string or Path to save log.

  • data (Any) – Data to save in file log

Returns:

True if success, False otherwise

Return type:

bool

ooodev.io.log.logging.set_log_level(level)[source]

Set the log level.

Parameters:

level (int) – The log level.

Return type:

None

ooodev.io.log.logging.warning(msg, *args, **kwargs)[source]

Logs warning message.

Parameters:
  • msg (Any) – message to debug.

  • args (Any, optional) – arguments.

  • kwargs (Any) –

Keyword Arguments:
  • exc_info – (_ExcInfoType): Exc Info Type Default to None

  • stack_info (bool) – Stack Info. Defaults to False.

  • stacklevel (int) – Stack Level. Defaults to 1.

  • extra (Mapping[str, object], None) – extra Defaults to None.

Return type:

None

Returns:

None