Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enahncement: Set default log level to ERROR and log to stdout #300

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions mytoyota/utils/logging/log_config.yaml
Original file line number Diff line number Diff line change
@@ -7,11 +7,10 @@ formatters:
datefmt: "%Y-%m-%d %H:%M:%S"

handlers:
file:
class: "logging.FileHandler"
stream:
class: "logging.StreamHandler"
formatter: "simple"
filename: ".log"
mode: "w"
stream: sys.stdout
filters:
- "logfilter"

@@ -28,6 +27,6 @@ filters:
- "guid':\\s*'([^']*)"

root:
level: "DEBUG"
level: "ERROR"
handlers:
- "file"
- "stream"
3 changes: 2 additions & 1 deletion simple_client_example.py
Original file line number Diff line number Diff line change
@@ -10,7 +10,8 @@
from mytoyota.models.summary import SummaryType

pp = pprint.PrettyPrinter(indent=4)
logger = logging.getLogger(__name__)
_LOGGER = logging.getLogger(__name__)


# Set your username and password in a file on top level called "credentials.json" in the format:
# {