-
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.
reinstated parts of __init__.py that are still needed
- Loading branch information
Showing
3 changed files
with
30 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,14 +6,14 @@ | |
from email.mime.multipart import MIMEMultipart | ||
from email.mime.text import MIMEText | ||
import os.path | ||
import logging | ||
|
||
# cisagov Libraries | ||
from pe_reports import app | ||
# from pe_reports import app | ||
|
||
# Setup logging to central file | ||
|
||
LOGGER = app.config["LOGGER"] | ||
|
||
# LOGGER = app.config["LOGGER"] | ||
LOGGER = logging.getLogger(__name__) | ||
|
||
class Message(MIMEMultipart): | ||
"""An email message sent from the CISA Cyber Assessments inbox. | ||
|
@@ -41,9 +41,9 @@ class Message(MIMEMultipart): | |
DefaultFrom = "[email protected]" | ||
DefaultCc = None | ||
DefaultBcc = [ | ||
"[email protected]", | ||
"[email protected].dhs.gov", | ||
"pe_automation@hq.dhs.gov", | ||
# "[email protected]", # disabled b/c cluttering the inbox | ||
# "pe_automation@hq.dhs.gov", # disabled b/c cluttering the inbox | ||
# "[email protected].dhs.gov", # You can also provide a work email | ||
] | ||
DefaultReplyTo = "[email protected]" | ||
|
||
|
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,23 @@ | ||
"""The pe_reports library.""" | ||
|
||
import logging | ||
from logging.handlers import RotatingFileHandler | ||
|
||
CENTRAL_LOGGING_FILE = "pe_reports_logging.log" | ||
DEBUG = False | ||
|
||
# Setup Rotating Logging | ||
"""Set up logging and call the run_pe_script function.""" | ||
if DEBUG is True: | ||
level = "DEBUG" | ||
else: | ||
level = "INFO" | ||
# Logging will rotate at 2GB | ||
logging.basicConfig( | ||
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s", | ||
datefmt="%m/%d/%Y %I:%M:%S", | ||
level=level, | ||
handlers=[ | ||
RotatingFileHandler(CENTRAL_LOGGING_FILE, maxBytes=2000000, backupCount=10) | ||
], | ||
) |
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