Skip to content

Commit

Permalink
Add timestamps to logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
dowlandaiello committed Jul 18, 2024
1 parent 9fa5998 commit 8239083
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion local-interchaintest/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ fn main() -> Result<(), Box<dyn StdError + Send + Sync>> {
.with_test(Box::new(tests::test_unprofitable_arb) as TestFn)
.build()?,
)?
// Test case (osmo -> osmos arb):
// Test case (astro -> osmos arb):
//
// - Osmo: untrn-uosmo @ 1 untrn/uosmo
// - Osmo: OSMO-bruhtoken @ 1 bruhtoken/OSMO
Expand Down
11 changes: 9 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,18 @@ async def main() -> None:

if args.log_file:
logging.basicConfig(
filename=args.log_file, level=os.environ.get("LOGLEVEL", "INFO").upper()
format="%(asctime)s %(levelname)-8s %(message)s",
datefmt="%Y-%m-%d %H:%M:%S",
filename=args.log_file,
level=os.environ.get("LOGLEVEL", "INFO").upper(),
)

else:
logging.basicConfig(
stream=sys.stdout, level=os.environ.get("LOGLEVEL", "INFO").upper()
format="%(asctime)s %(levelname)-8s %(message)s",
datefmt="%Y-%m-%d %H:%M:%S",
stream=sys.stdout,
level=os.environ.get("LOGLEVEL", "INFO").upper(),
)

# Always make sure the history file exists
Expand Down

0 comments on commit 8239083

Please sign in to comment.