Skip to content

Commit b4e0312

Browse files
committed
Update log handling in Command class for improved clarity and default behavior
1 parent b7a4388 commit b4e0312

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/iop/_cli.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,10 @@ def _handle_migrate(self) -> None:
143143
_Utils.migrate(migrate_path)
144144

145145
def _handle_log(self) -> None:
146-
log_name = _Director.get_default_production() if self.args.log == 'not_set' else self.args.log
147-
print(_Director.get_production_log(log_name))
146+
if self.args.log == 'not_set':
147+
print(_Director.log_production_top())
148+
else:
149+
print(_Director.log_production(self.args.log))
148150

149151
def _handle_init(self) -> None:
150152
_Utils.setup(None)

src/iop/_director.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ async def _log_production_async(handler):
222222
await asyncio.sleep(1)
223223

224224
@staticmethod
225-
def log_production_top(top):
225+
def log_production_top(top=10):
226226
"""
227227
Log the top N logs of the production
228228
Parameters:

0 commit comments

Comments
 (0)