-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from ARYAN-NIKNEZHAD/develop
Develop to Main
- Loading branch information
Showing
47 changed files
with
3,044 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
from .format_options import FORMAT_OPTIONS | ||
from .defaults import DefaultLoggingSettings | ||
from .format_specifiers import LOG_FORMAT_SPECIFIERS | ||
from .log_format_options import FORMAT_OPTIONS | ||
from .default_settings import DefaultLoggingSettings | ||
from .log_format_specifiers import LOG_FORMAT_SPECIFIERS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import os | ||
from typing import cast | ||
from dataclasses import dataclass, field | ||
|
||
from django_logging.constants.config_types import ( | ||
LogFileFormatsType, | ||
LogDir, | ||
LogLevel, | ||
LogLevels, | ||
FormatOption, | ||
LogDateFormat, | ||
LogEmailNotifierType, | ||
) | ||
|
||
|
||
@dataclass(frozen=True) | ||
class DefaultLoggingSettings: | ||
log_dir: LogDir = field(default_factory=lambda: os.path.join(os.getcwd(), "logs")) | ||
log_levels: LogLevels = field( | ||
default_factory=lambda: ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"] | ||
) | ||
log_date_format: LogDateFormat = "%Y-%m-%d %H:%M:%S" | ||
auto_initialization_enable: bool = True | ||
initialization_message_enable: bool = True | ||
log_file_formats: LogFileFormatsType = field( | ||
default_factory=lambda: cast( | ||
LogFileFormatsType, | ||
{ | ||
"DEBUG": 1, | ||
"INFO": 1, | ||
"WARNING": 1, | ||
"ERROR": 1, | ||
"CRITICAL": 1, | ||
}, | ||
) | ||
) | ||
log_console_level: LogLevel = "DEBUG" | ||
log_console_format: FormatOption = 1 | ||
log_console_colorize: bool = True | ||
log_email_notifier: LogEmailNotifierType = field( | ||
default_factory=lambda: cast( | ||
LogEmailNotifierType, | ||
{ | ||
"ENABLE": False, | ||
"NOTIFY_ERROR": False, | ||
"NOTIFY_CRITICAL": False, | ||
"LOG_FORMAT": 1, | ||
"USE_TEMPLATE": True, | ||
}, | ||
) | ||
) |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .log_level_filter import LoggingLevelFilter |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
from .colorized_formatter import ColorizedFormatter | ||
from .colored_formatter import ColoredFormatter |
8 changes: 4 additions & 4 deletions
8
...logging/formatters/colorized_formatter.py → ...o_logging/formatters/colored_formatter.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
Oops, something went wrong.