valohai / valohai-utils

Python helper library for Valohai
MIT License
2 stars 2 forks source link

Simple logging API #15

Closed JuhaKiili closed 4 years ago

akx commented 4 years ago

Another cool API for this could be a partial log scope:

with valohai.logs.log_scope() as l:
  l['foo'] = 8

You can automagically flush values in __exit__ then.

JuhaKiili commented 4 years ago

Another cool API for this could be a partial log scope:

with valohai.logs.log_scope() as l:
  l['foo'] = 8

You can automagically flush values in __exit__ then.

Could be nice, but referring to the "Otso principle", having multiple ways of achieving the same goal is adding complexity. I'm also aiming for MVP here and this feels like extra.