-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added all the logging functionality and updated README.md
- Loading branch information
1 parent
e72c6ae
commit 71886ed
Showing
7 changed files
with
443 additions
and
81 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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
class LoglyException(Exception): | ||
""" | ||
Base exception class for Logly. All specific Logly exceptions should inherit from this class. | ||
""" | ||
def __init__(self, message): | ||
""" | ||
Initialize a LoglyException. | ||
Parameters: | ||
- message (str): The error message. | ||
""" | ||
super().__init__(message) | ||
|
||
|
||
class FilePathNotFoundException(LoglyException): | ||
""" | ||
Exception raised when the specified file path is not found. | ||
""" | ||
pass | ||
|
||
|
||
class FileCreationError(LoglyException): | ||
""" | ||
Exception raised when there is an error creating or writing to the log file. | ||
""" | ||
pass | ||
|
||
|
||
class FileAccessError(LoglyException): | ||
""" | ||
Exception raised when there is an error accessing the log file. | ||
""" | ||
pass | ||
|
||
|
||
class InvalidConfigError(LoglyException): | ||
""" | ||
Exception raised for invalid Logly configuration. | ||
""" | ||
pass | ||
|
||
|
||
class InvalidLogLevelError(LoglyException): | ||
""" | ||
Exception raised when an invalid log level is provided. | ||
""" | ||
pass |
Oops, something went wrong.