mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 23:10:29 +03:00
method to globally set logging to output nicely to the console
This will make all of the direct calls to logging level functions output in a format that looks appropriate for the console. Previously, the default output looked like it should be written to a log file.
This commit is contained in:
parent
091fe9b260
commit
76d9eddb3a
5 changed files with 42 additions and 4 deletions
|
|
@ -83,6 +83,8 @@ def main():
|
|||
)
|
||||
options = parser.parse_args()
|
||||
|
||||
common.set_console_logging(options.verbose)
|
||||
|
||||
fdroiddir = os.getcwd()
|
||||
test_config = dict()
|
||||
examplesdir = common.get_examples_dir()
|
||||
|
|
@ -290,4 +292,9 @@ and https://f-droid.org/docs/Signing_Process'''
|
|||
)
|
||||
% os.path.join(fdroiddir, 'repo')
|
||||
)
|
||||
logging.info(msg)
|
||||
if not options.quiet:
|
||||
# normally, INFO is only shown with --verbose, but show this unless --quiet
|
||||
logger = logging.getLogger()
|
||||
logger.setLevel(logging.INFO)
|
||||
logger.info(msg)
|
||||
logging.shutdown()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue