Skip to content

Commit

Permalink
Add flag to suppress logs except for errors
Browse files Browse the repository at this point in the history
  • Loading branch information
cccs-rs committed Jan 8, 2025
1 parent a53ae67 commit 2bdd175
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/unoserver/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,12 @@ def main():
help="Terminate Libreoffice and exit if a conversion does not complete in the "
"given time (in seconds).",
)
parser.add_argument(
"-s",
"--silent",
action="store_true",
help="Suppress all output except for errors.",
)
args = parser.parse_args()

if args.daemon:
Expand All @@ -312,6 +318,9 @@ def main():
proc = subprocess.Popen(cmd)
return proc.pid

if args.silent:
logger.setLevel(logging.ERROR)

with tempfile.TemporaryDirectory() as tmpuserdir:
user_installation = Path(tmpuserdir).as_uri()

Expand Down

0 comments on commit 2bdd175

Please sign in to comment.