Skip to content

Commit

Permalink
feat(monitoring): enable stdout logging in Compute Engine
Browse files Browse the repository at this point in the history
  • Loading branch information
rayanht committed Apr 19, 2022
1 parent 2dbbe3d commit 309087d
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,14 @@ class Event(Enum):

class Monitor:
def __init__(self) -> None:
outputs = [daiquiri.output.Datadog()]
if not is_gce_instance():
outputs.append(
daiquiri.output.Stream(
formatter=daiquiri.formatter.ColorFormatter(
fmt=("[%(levelname)s] [%(asctime)s] %(message)s")
)
),
)
outputs = [
daiquiri.output.Stream(
formatter=daiquiri.formatter.ColorFormatter(
fmt=("[%(levelname)s] [%(asctime)s] %(message)s")
)
),
daiquiri.output.Datadog(),
]
daiquiri.setup(
level=logging.INFO,
outputs=outputs,
Expand Down

0 comments on commit 309087d

Please sign in to comment.