mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2025-09-09 07:48:57 +00:00
Merge pull request #814 from PR0M3TH3AN/codex/remove-logging_config.py-and-update-references
Remove obsolete Nostr logging configuration module
This commit is contained in:
@@ -1,41 +0,0 @@
|
|||||||
# nostr/logging_config.py
|
|
||||||
|
|
||||||
import logging
|
|
||||||
import os
|
|
||||||
|
|
||||||
# Comment out or remove the configure_logging function to avoid conflicts
|
|
||||||
# def configure_logging():
|
|
||||||
# """
|
|
||||||
# Configures logging with both file and console handlers.
|
|
||||||
# Logs include the timestamp, log level, message, filename, and line number.
|
|
||||||
# Only ERROR and higher-level messages are shown in the terminal, while all messages
|
|
||||||
# are logged in the log file.
|
|
||||||
# """
|
|
||||||
# logger = logging.getLogger()
|
|
||||||
# logger.setLevel(logging.DEBUG) # Set root logger to DEBUG
|
|
||||||
#
|
|
||||||
# # Prevent adding multiple handlers if configure_logging is called multiple times
|
|
||||||
# if not logger.handlers:
|
|
||||||
# # Create the 'logs' folder if it doesn't exist
|
|
||||||
# log_directory = 'logs'
|
|
||||||
# if not os.path.exists(log_directory):
|
|
||||||
# os.makedirs(log_directory)
|
|
||||||
#
|
|
||||||
# # Create handlers
|
|
||||||
# c_handler = logging.StreamHandler()
|
|
||||||
# f_handler = logging.FileHandler(os.path.join(log_directory, 'app.log'))
|
|
||||||
#
|
|
||||||
# # Set levels: only errors and critical messages will be shown in the console
|
|
||||||
# c_handler.setLevel(logging.ERROR)
|
|
||||||
# f_handler.setLevel(logging.DEBUG)
|
|
||||||
#
|
|
||||||
# # Create formatters and add them to handlers, include file and line number in log messages
|
|
||||||
# formatter = logging.Formatter(
|
|
||||||
# '%(asctime)s [%(levelname)s] %(message)s [%(filename)s:%(lineno)d]'
|
|
||||||
# )
|
|
||||||
# c_handler.setFormatter(formatter)
|
|
||||||
# f_handler.setFormatter(formatter)
|
|
||||||
#
|
|
||||||
# # Add handlers to the logger
|
|
||||||
# logger.addHandler(c_handler)
|
|
||||||
# logger.addHandler(f_handler)
|
|
@@ -28,7 +28,6 @@ Generated on: 2025-04-06
|
|||||||
├── encryption_manager.py
|
├── encryption_manager.py
|
||||||
├── event_handler.py
|
├── event_handler.py
|
||||||
├── key_manager.py
|
├── key_manager.py
|
||||||
├── logging_config.py
|
|
||||||
├── utils.py
|
├── utils.py
|
||||||
├── utils/
|
├── utils/
|
||||||
├── __init__.py
|
├── __init__.py
|
||||||
@@ -3082,52 +3081,6 @@ __all__ = ['NostrClient']
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## nostr/logging_config.py
|
|
||||||
```python
|
|
||||||
# nostr/logging_config.py
|
|
||||||
|
|
||||||
import logging
|
|
||||||
import os
|
|
||||||
|
|
||||||
# Comment out or remove the configure_logging function to avoid conflicts
|
|
||||||
# def configure_logging():
|
|
||||||
# """
|
|
||||||
# Configures logging with both file and console handlers.
|
|
||||||
# Logs include the timestamp, log level, message, filename, and line number.
|
|
||||||
# Only ERROR and higher-level messages are shown in the terminal, while all messages
|
|
||||||
# are logged in the log file.
|
|
||||||
# """
|
|
||||||
# logger = logging.getLogger()
|
|
||||||
# logger.setLevel(logging.DEBUG) # Set root logger to DEBUG
|
|
||||||
#
|
|
||||||
# # Prevent adding multiple handlers if configure_logging is called multiple times
|
|
||||||
# if not logger.handlers:
|
|
||||||
# # Create the 'logs' folder if it doesn't exist
|
|
||||||
# log_directory = 'logs'
|
|
||||||
# if not os.path.exists(log_directory):
|
|
||||||
# os.makedirs(log_directory)
|
|
||||||
#
|
|
||||||
# # Create handlers
|
|
||||||
# c_handler = logging.StreamHandler()
|
|
||||||
# f_handler = logging.FileHandler(os.path.join(log_directory, 'app.log'))
|
|
||||||
#
|
|
||||||
# # Set levels: only errors and critical messages will be shown in the console
|
|
||||||
# c_handler.setLevel(logging.ERROR)
|
|
||||||
# f_handler.setLevel(logging.DEBUG)
|
|
||||||
#
|
|
||||||
# # Create formatters and add them to handlers, include file and line number in log messages
|
|
||||||
# formatter = logging.Formatter(
|
|
||||||
# '%(asctime)s [%(levelname)s] %(message)s [%(filename)s:%(lineno)d]'
|
|
||||||
# )
|
|
||||||
# c_handler.setFormatter(formatter)
|
|
||||||
# f_handler.setFormatter(formatter)
|
|
||||||
#
|
|
||||||
# # Add handlers to the logger
|
|
||||||
# logger.addHandler(c_handler)
|
|
||||||
# logger.addHandler(f_handler)
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
## nostr/event_handler.py
|
## nostr/event_handler.py
|
||||||
```python
|
```python
|
||||||
# nostr/event_handler.py
|
# nostr/event_handler.py
|
||||||
|
Reference in New Issue
Block a user