arkouda.logger¶
Logging utilities for Arkouda client operations.
The arkouda.logger module provides an extensible, configurable logging system tailored to Arkouda’s Python client. It supports structured logging using the standard logging module with added conveniences, such as type-safe log level enums, named handlers, and global verbosity toggles.
Main Features¶
ArkoudaLogger: A subclass of logging.Logger with Arkouda-specific defaults and dynamic handler configuration.
LogLevel: Enum of supported logging levels (DEBUG, INFO, WARN, etc.)
Global registry of loggers for coordinated verbosity control
Utility methods for enabling/disabling verbose output globally
Client-side custom log injection into the Arkouda server logs via write_log
Exports¶
- __all__ = [
“LogLevel”, “enableVerbose”, “disableVerbose”, “write_log”,
]
Classes¶
- LogLevelEnum
Enum for defining log levels in a type-safe way (DEBUG, INFO, WARN, etc.).
- ArkoudaLoggerLogger
A wrapper around Python’s standard Logger that adds Arkouda-specific conventions, log formatting, and runtime handler reconfiguration.
Functions¶
- getArkoudaLogger(name, handlers=None, logFormat=None, logLevel=None)
Instantiate a logger with customizable format and log level.
- getArkoudaClientLogger(name)
Instantiate a logger for client-facing output (no formatting, INFO level default).
- enableVerbose()
Globally set all ArkoudaLoggers to DEBUG level.
- disableVerbose(logLevel=LogLevel.INFO)
Globally disable DEBUG output by setting all loggers to the specified level.
- write_log(log_msg, tag=”ClientGeneratedLog”, log_lvl=LogLevel.INFO)
Submit a custom log message to the Arkouda server’s logging system.
Usage Example¶
>>> from arkouda.logger import getArkoudaLogger, LogLevel
>>> logger = getArkoudaLogger("myLogger")
>>> logger.info("This is an info message.")
>>> logger.enableVerbose()
>>> logger.debug("Now showing debug messages.")
See also
-
, -
Classes¶
Create a collection of name/value pairs. |
Functions¶
|
Disables verbose logging. |
|
Enable verbose logging (DEBUG log level) for all ArkoudaLoggers. |
|
Allow the user to write custom logs. |
Module Contents¶
- class arkouda.logger.LogLevel(*args, **kwds)[source]¶
Bases:
enum.Enum
Create a collection of name/value pairs.
Example enumeration:
>>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3
Access them by:
attribute access:
>>> Color.RED <Color.RED: 1>
value lookup:
>>> Color(1) <Color.RED: 1>
name lookup:
>>> Color['RED'] <Color.RED: 1>
Enumerations can be iterated over, and know how many members they have:
>>> len(Color) 3
>>> list(Color) [<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]
Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.
- CRITICAL = 'CRITICAL'¶
- DEBUG = 'DEBUG'¶
- ERROR = 'ERROR'¶
- INFO = 'INFO'¶
- WARN = 'WARN'¶
- arkouda.logger.disableVerbose(logLevel: LogLevel = LogLevel.INFO) None [source]¶
Disables verbose logging.
Disables verbose logging (DEBUG log level) for all ArkoudaLoggers, setting the log level for each to the logLevel parameter.
- Parameters:
logLevel (LogLevel) – The new log level, defaultts to LogLevel.INFO
- Raises:
TypeError – Raised if logLevel is not a LogLevel enum
- arkouda.logger.enableVerbose() None [source]¶
Enable verbose logging (DEBUG log level) for all ArkoudaLoggers.
- arkouda.logger.write_log(log_msg: str, tag: str = 'ClientGeneratedLog', log_lvl: LogLevel = LogLevel.INFO)[source]¶
Allow the user to write custom logs.
- Parameters:
log_msg (str) – The message to be added to the server log
tag (str) – The tag to use in the log. This takes the place of the server function name. Allows for easy identification of custom logs. Defaults to “ClientGeneratedLog”
log_lvl (LogLevel) – The type of log to be written Defaults to LogLevel.INFO
See also