pfun.logging.Logging
Module providing logging capability
critical(self, msg, stack_info=False, exc_info=False)
Create an effect that calls built-in logging.info
Examples:
1 2 |
|
Parameters:
Name | Type | Description | Default |
---|---|---|---|
msg |
str |
the log message |
required |
stack_info |
bool |
whether to include stack information in the log message |
False |
exc_info |
Union[bool, Tuple[Type[BaseException], BaseException, traceback]] |
whether to include exception info in the log message |
False |
Returns:
Type | Description |
---|---|
pfun.effect.Effect[object, NoReturn, NoneType] |
|
debug(self, msg, stack_info=False, exc_info=False)
Create an effect that calls built-in logging.debug
Examples:
1 2 |
|
Parameters:
Name | Type | Description | Default |
---|---|---|---|
msg |
str |
the log message |
required |
stack_info |
bool |
whether to include stack information in the log message |
False |
exc_info |
Union[bool, Tuple[Type[BaseException], BaseException, traceback]] |
whether to include exception info in the log message |
False |
Returns:
Type | Description |
---|---|
pfun.effect.Effect[object, NoReturn, NoneType] |
|
error(self, msg, stack_info=False, exc_info=False)
Create an effect that calls built-in logging.error
Examples:
1 2 |
|
Parameters:
Name | Type | Description | Default |
---|---|---|---|
msg |
str |
the log message |
required |
stack_info |
bool |
whether to include stack information in the log message |
False |
exc_info |
Union[bool, Tuple[Type[BaseException], BaseException, traceback]] |
whether to include exception info in the log message |
False |
Returns:
Type | Description |
---|---|
pfun.effect.Effect[object, NoReturn, NoneType] |
|
exception(self, msg, stack_info=True, exc_info=True)
Create an effect that calls built-in logging.exception
Examples:
1 2 |
|
Parameters:
Name | Type | Description | Default |
---|---|---|---|
msg |
str |
the log message |
required |
stack_info |
bool |
whether to include stack information in the log message |
True |
exc_info |
Union[bool, Tuple[Type[BaseException], BaseException, traceback]] |
whether to include exception info in the log message |
True |
Returns:
Type | Description |
---|---|
pfun.effect.Effect[object, NoReturn, NoneType] |
|
get_logger(self, name=None)
Create an effect that produces a Logger
by calling built-in
logging.getLogger
Examples:
1 2 3 4 |
|
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
Optional[str] |
name of logger |
None |
Returns:
Type | Description |
---|---|
Logger |
|
info(self, msg, stack_info=False, exc_info=False)
Create an effect that calls built-in logging.info
Examples:
1 2 |
|
Parameters:
Name | Type | Description | Default |
---|---|---|---|
msg |
str |
the log message |
required |
stack_info |
bool |
whether to include stack information in the log message |
False |
exc_info |
Union[bool, Tuple[Type[BaseException], BaseException, traceback]] |
whether to include exception info in the log message |
False |
Returns:
Type | Description |
---|---|
pfun.effect.Effect[object, NoReturn, NoneType] |
|
warning(self, msg, stack_info=False, exc_info=False)
Create an effect that calls built-in logging.warning
Examples:
1 2 |
|
Parameters:
Name | Type | Description | Default |
---|---|---|---|
msg |
str |
the log message |
required |
stack_info |
bool |
whether to include stack information in the log message |
False |
exc_info |
Union[bool, Tuple[Type[BaseException], BaseException, traceback]] |
whether to include exception info in the log message |
False |
Returns:
Type | Description |
---|---|
pfun.effect.Effect[object, NoReturn, NoneType] |
|
pfun.logging.HasLogging
Module provider for logging capability
:type logging: Logging :attribute logging: The logging instance
pfun.logging.get_logger(name=None)
Create an effect that produces a Logger
by calling built-in
logging.getLogger
Examples:
1 2 3 4 5 6 |
|
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
Optional[str] |
name of logger |
None |
Returns:
Type | Description |
---|---|
pfun.effect.Effect[pfun.logging.HasLogging, NoReturn, pfun.logging.Logger] |
|
pfun.logging.debug(msg, stack_info=False, exc_info=False)
Create an effect that calls built-in logging.debug
Examples:
1 2 3 4 |
|
Parameters:
Name | Type | Description | Default |
---|---|---|---|
msg |
str |
the log message |
required |
stack_info |
bool |
whether to include stack information in the log message |
False |
exc_info |
Union[bool, Tuple[Type[BaseException], BaseException, traceback]] |
whether to include exception info in the log message |
False |
Returns:
Type | Description |
---|---|
pfun.effect.Effect[pfun.logging.HasLogging, NoReturn, NoneType] |
|
pfun.logging.info(msg, stack_info=False, exc_info=False)
Create an effect that calls built-in logging.info
Examples:
1 2 3 4 |
|
Parameters:
Name | Type | Description | Default |
---|---|---|---|
msg |
str |
the log message |
required |
stack_info |
bool |
whether to include stack information in the log message |
False |
exc_info |
Union[bool, Tuple[Type[BaseException], BaseException, traceback]] |
whether to include exception info in the log message |
False |
Returns:
Type | Description |
---|---|
pfun.effect.Effect[pfun.logging.HasLogging, NoReturn, NoneType] |
|
pfun.logging.warning(msg, stack_info=False, exc_info=False)
Create an effect that calls built-in logging.warning
Examples:
1 2 3 4 |
|
Parameters:
Name | Type | Description | Default |
---|---|---|---|
msg |
str |
the log message |
required |
stack_info |
bool |
whether to include stack information in the log message |
False |
exc_info |
Union[bool, Tuple[Type[BaseException], BaseException, traceback]] |
whether to include exception info in the log message |
False |
Returns:
Type | Description |
---|---|
pfun.effect.Effect[pfun.logging.HasLogging, NoReturn, NoneType] |
|
pfun.logging.error(msg, stack_info=False, exc_info=False)
Create an effect that calls built-in logging.error
Examples:
1 2 3 4 |
|
Parameters:
Name | Type | Description | Default |
---|---|---|---|
msg |
str |
the log message |
required |
stack_info |
bool |
whether to include stack information in the log message |
False |
exc_info |
Union[bool, Tuple[Type[BaseException], BaseException, traceback]] |
whether to include exception info in the log message |
False |
Returns:
Type | Description |
---|---|
pfun.effect.Effect[pfun.logging.HasLogging, NoReturn, NoneType] |
|
pfun.logging.exception(msg, stack_info=True, exc_info=True)
Create an effect that calls built-in logging.exception
Examples:
1 2 3 4 |
|
Parameters:
Name | Type | Description | Default |
---|---|---|---|
msg |
str |
the log message |
required |
stack_info |
bool |
whether to include stack information in the log message |
True |
exc_info |
Union[bool, Tuple[Type[BaseException], BaseException, traceback]] |
whether to include exception info in the log message |
True |
Returns:
Type | Description |
---|---|
pfun.effect.Effect[pfun.logging.HasLogging, NoReturn, NoneType] |
|
pfun.logging.critical(msg, stack_info=False, exc_info=False)
Create an effect that calls built-in logging.critical
Examples:
1 2 3 4 |
|
Parameters:
Name | Type | Description | Default |
---|---|---|---|
msg |
str |
the log message |
required |
stack_info |
bool |
whether to include stack information in the log message |
False |
exc_info |
Union[bool, Tuple[Type[BaseException], BaseException, traceback]] |
whether to include exception info in the log message |
False |
Returns:
Type | Description |
---|---|
pfun.effect.Effect[pfun.logging.HasLogging, NoReturn, NoneType] |
|