Skip to content

Commit

Permalink
clean up logging, use extra args
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Jan 28, 2023
1 parent 4547bce commit 3359138
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/logging.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 1
formatters:
simple:
format: '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
format: '[%(asctime)s] %(levelname)s: %(name)s: %(message)s'
handlers:
console:
class: logging.StreamHandler
Expand Down
2 changes: 2 additions & 0 deletions api/onnx_web/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from . import logging

from .chain import (
correct_gfpgan,
upscale_resrgan,
Expand Down
2 changes: 1 addition & 1 deletion api/onnx_web/chain/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def __call__(self, ctx: ServerContext, params: ImageParams, source: Image.Image,
kwargs = {**pipeline_kwargs, **kwargs}

logger.info('running stage %s on result image with dimensions %sx%s, %s',
name, image.width, image.height, kwargs)
name, image.width, image.height, kwargs.keys())

if image.width > stage_params.tile_size or image.height > stage_params.tile_size:
logger.info('source image larger than tile size of %s, tiling stage',
Expand Down

0 comments on commit 3359138

Please sign in to comment.