13 lines
282 B
Python
13 lines
282 B
Python
class Logger:
|
|
def __init__(self):
|
|
self._log_func = print # Default to print if not initialized
|
|
|
|
def init_logger(self, log_func):
|
|
self._log_func = log_func
|
|
|
|
def log(self, message):
|
|
self._log_func(message)
|
|
|
|
# Global instance
|
|
app_logger = Logger()
|