logs = []
def log_decorator(method):
@functools.wraps(method)
def wrapper(*args, **kwargs):
result = method(*args, **kwargs)
logs.append(
{
"timestamp": time.time(),
"result": result,
}
)
return result
return wrapper
In the real world, I better use logging
or
structlog
, but it's worth remembering I can use the
decorator for some use cases.
Ketone 10 mg/dl (From my experience, I'm no good at Keto. That mey be because I'm Vietnamese, which has a long history with rice, i.e., carbohydrate)
Protein shake 20g Sushi Salad 10g Cheese 10g Salmon 5g Cabbage 5g
Total carbohydrate 50g
MUST:
TODO: