Skip to content

Commit

Permalink
added CLI option for logdir
Browse files Browse the repository at this point in the history
  • Loading branch information
cpmpercussion committed Aug 16, 2024
1 parent d9bf044 commit c133b3a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions impsy/interaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,11 @@ def serve_forever(self):

@click.command(name="run")
@click.option('--config', '-c', default='config.toml', help='Path to a .toml configuration file.')
def run(config: str):
@click.option('--logdir', '-l', default='logs', help='Path to a directory for logs.')
def run(config: str, logdir: str):
"""Run IMPSY interaction system with MIDI, WebSockets, and OSC."""
click.secho("IMPSY Starting up...", fg="blue")
config_data = get_config_data(config)
interaction_server = InteractionServer(config_data)
# TODO: have some way set log dir in config as well?
interaction_server = InteractionServer(config_data, log_location=logdir)
interaction_server.serve_forever()

0 comments on commit c133b3a

Please sign in to comment.