Repository: PrefectHQ/prefect

Issue:
Improve the classification between DEBUG and INFO logs
Right now, we have really great DEBUG level logs.  However, our INFO level logs are very sparse.  To give you a clear idea:

```python
import datetime
from prefect import task, Flow

@task(max_retries=1, retry_delay=datetime.timedelta(seconds=0))
def fail():
    raise ValueError("failed")

f = Flow(tasks=[fail])
f.run()
```
results in:

### INFO level
```
[2019-02-24 05:41:08,028] INFO - prefect.FlowRunner | Beginning Flow run for 'Flow' | MainProcess
[2019-02-24 05:41:08,029] INFO - prefect.FlowRunner | Starting flow run. | MainProcess
[2019-02-24 05:41:08,282] INFO - prefect.TaskRunner | Unexpected error: ValueError('failed',) | MainProcess
[2019-02-24 05:41:08,310] INFO - prefect.FlowRunner | Flow run RUNNING: terminal tasks are incomplete. | MainProcess
```

### DEBUG level
```
[2019-02-24 05:40:21,082] INFO - prefect.FlowRunner | Beginning Flow run for 'Flow' | MainProcess
[2019-02-24 05:40:21,083] INFO - prefect.FlowRunner | Starting flow run. | MainProcess
[2019-02-24 05:40:21,083] DEBUG - prefect.FlowRunner | Flow 'Flow': Handling state change from Pending to Running | MainProcess
[2019-02-24 05:40:21,468] DEBUG - prefect.TaskRunner | Task 'fail': Starting task run... | MainProcess
[2019-02-24 05:40:21,468] DEBUG - prefect.TaskRunner | Task 'fail': Handling state change from Pending to Running | MainProcess
[2019-02-24 05:40:21,469] DEBUG - prefect.TaskRunner | Task 'fail': Calling task.run() method... | MainProcess
[2019-02-24 05:40:21,469] INFO - prefect.TaskRunner | Unexpected error: ValueError('failed',) | MainProcess
[2019-02-24 05:40:21,469] DEBUG - prefect.TaskRunner | Task 'fail': Handling state change from Running to Failed | MainProcess
[2019-02-24 05:40:21,470] DEBUG - prefect.TaskRunner | Task 'fail': Handling state change from Failed to Retrying | MainProcess
[2019-02-24 05:40:21,470] DEBUG - prefect.TaskRunner | Task 'fail': finished task run for task with final state: 'Retrying' | MainProcess
[2019-02-24 05:40:21,496] INFO - prefect.FlowRunner | Flow run RUNNING: terminal tasks are incomplete. | MainProcess
[2019-02-24 05:40:21,496] DEBUG - prefect.FlowRunner | Flow 'Flow': Handling state change from Running to Running | MainProcess
```

Clearly logging _every_ state change is excessive and well suited for the DEBUG level, but we should at least have the beginning and end of every Task run at the INFO level, so the INFO level logs tell a clearer story of execution.


Discussion:

Resolving patch:
diff --git a/src/prefect/core/flow.py b/src/prefect/core/flow.py
--- a/src/prefect/core/flow.py
+++ b/src/prefect/core/flow.py
@@ -873,6 +873,10 @@ def _run_on_schedule(self, **kwargs: Any) -> "prefect.engine.state.State":
             )  # type: prefect.engine.state.State
             now = pendulum.now("utc")
             naptime = max((next_run_time - now).total_seconds(), 0)
+            if naptime > 0:
+                self.logger.info(
+                    "Waiting for next scheduled run at {}".format(next_run_time)
+                )
             time.sleep(naptime)
 
             ## begin a single flow run
@@ -893,6 +897,12 @@ def _run_on_schedule(self, **kwargs: Any) -> "prefect.engine.state.State":
                 ## wait until first task is ready for retry
                 now = pendulum.now("utc")
                 naptime = max((earliest_start - now).total_seconds(), 0)
+                if naptime > 0:
+                    self.logger.info(
+                        "Waiting for next available Task run at {}".format(
+                            earliest_start
+                        )
+                    )
                 time.sleep(naptime)
         return flow_state  # to appease mypy
 
diff --git a/src/prefect/engine/task_runner.py b/src/prefect/engine/task_runner.py
--- a/src/prefect/engine/task_runner.py
+++ b/src/prefect/engine/task_runner.py
@@ -192,7 +192,7 @@ def run(
         mapped = any([e.mapped for e in upstream_states]) and map_index is None
         task_inputs = {}  # type: Dict[str, Any]
 
-        self.logger.debug(
+        self.logger.info(
             "Task '{name}': Starting task run...".format(name=context["task_full_name"])
         )
 
@@ -284,7 +284,7 @@ def run(
             if prefect.context.get("raise_on_exception"):
                 raise exc
 
-        self.logger.debug(
+        self.logger.info(
             "Task '{name}': finished task run for task with final state: '{state}'".format(
                 name=context["task_full_name"], state=type(state).__name__
             )


Test patch: