Skip to content

Commit

Permalink
Explicitly setting crash log level instead of setting to none
Browse files Browse the repository at this point in the history
  • Loading branch information
slundqui committed Jan 16, 2024
1 parent 1171ac4 commit 1cb755f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from __future__ import annotations

import asyncio
import logging
import os
import time
from dataclasses import asdict, dataclass
Expand Down Expand Up @@ -99,7 +100,7 @@ class Config:
Whether to log crash reports to rollbar. Defaults to False.
rollbar_log_prefix: str | None, optional
The prefix to prepend to rollbar exception messages
crash_log_level: int | None, optional
crash_log_level: int, optional
The log level to log crashes at. Defaults to critical.
crash_log_ticker: bool | None, optional
Whether to log the trade ticker in crash reports. Defaults to False.
Expand Down Expand Up @@ -150,7 +151,7 @@ class Config:
preview_before_trade: bool = False
log_to_rollbar: bool = False
rollbar_log_prefix: str | None = None
crash_log_level: int | None = None
crash_log_level: int = logging.CRITICAL
crash_log_ticker: bool = False
# Random generators
rng_seed: int | None = None
Expand Down
5 changes: 5 additions & 0 deletions lib/agent0/agent0/interactive_fuzz/helpers/setup_fuzz.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
"""Setup an interactive enfironment for fuzz testing."""
from __future__ import annotations

import logging

import numpy as np
from fixedpointmath import FixedPoint
from hyperlogs import setup_logging
Expand Down Expand Up @@ -73,6 +75,9 @@ def setup_fuzz(

# Parameters for pool initialization.
# Using a day for checkpoint duration to speed things up
if crash_log_level is None:
crash_log_level = logging.CRITICAL

initial_pool_config = InteractiveHyperdrive.Config(
preview_before_trade=True,
checkpoint_duration=86400,
Expand Down

0 comments on commit 1cb755f

Please sign in to comment.