Skip to content

Commit

Permalink
Don't record oss verbose log.
Browse files Browse the repository at this point in the history
  • Loading branch information
cuihaikuo committed Dec 17, 2018
1 parent 7fa7f01 commit 87a2fd7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions seafobj/backends/alioss.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
import httplib
import oss2

# set log level to WARNING
# the api set_file_logger exists after oss2 2.6.0, which has a lot of 'INFO' log
try:
log_file_path = "log.log"
oss2.set_file_logger(log_file_path, 'oss2', logging.WARNING)
except:
pass

class OSSConf(object):
def __init__(self, key_id, key, bucket_name, host):
self.key_id = key_id
Expand Down

0 comments on commit 87a2fd7

Please sign in to comment.