-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7c750fa
commit 523a9f4
Showing
20 changed files
with
79 additions
and
273 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
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 was deleted.
Oops, something went wrong.
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,29 @@ | ||
from anisearch.search.AniSearch import AniSearch | ||
import logging | ||
|
||
LOG_FORMAT = "%(asctime)s %(levelname)s %(message)s" | ||
LOG_FILE = "search.log" | ||
|
||
|
||
def setup_logger(name: str = "global", level: int = logging.DEBUG) -> logging.Logger: | ||
logger = logging.getLogger(name) | ||
if not logger.handlers: | ||
logger.setLevel(level) | ||
|
||
try: | ||
file_handler = logging.FileHandler(LOG_FILE, mode='w') | ||
file_handler.setLevel(logging.DEBUG) | ||
file_handler.setFormatter(logging.Formatter(LOG_FORMAT)) | ||
logger.addHandler(file_handler) | ||
except Exception as e: | ||
print(f"Failed to set up file handler: {e}") | ||
|
||
stream_handler = logging.StreamHandler() | ||
stream_handler.setLevel(logging.INFO) | ||
logger.addHandler(stream_handler) | ||
|
||
return logger | ||
|
||
|
||
log = setup_logger() | ||
|
||
eval("from .AniSearch import AniSearch") |
Empty file.
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
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
Oops, something went wrong.