Skip to content

Commit 9449fa6

Browse files
committed
Set the payouts logging levels
1 parent 038d287 commit 9449fa6

File tree

4 files changed

+14
-19
lines changed

4 files changed

+14
-19
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "squaredown"
3-
version = "1.6.3"
3+
version = "1.6.4"
44
description = "Customized Square interface"
55
authors = ["Jason Romano <aracnid@gmail.com>"]
66
license = "MIT"

squaredown/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
from squaredown.orders import Orders
77

88

9-
__version__ = "1.6.3"
9+
__version__ = "1.6.4"

squaredown/logging_config.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,13 @@
2727
"squaredown.catalog": {
2828
"level": "DEBUG"
2929
},
30+
"squaredown.itemizations": {
31+
"level": "WARNING"
32+
},
3033
"squaredown.orders": {
34+
"level": "WARNING"
35+
},
36+
"squaredown.payouts": {
3137
"level": "INFO"
3238
},
3339
"urllib3": {
@@ -38,4 +44,4 @@
3844
"level": "DEBUG",
3945
"handlers": ["console"]
4046
}
41-
}
47+
}

squaredown/payouts.py

+5-16
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def pull(self, **kwargs):
6060

6161
# end if no payouts
6262
if not payouts or len(payouts) == 0:
63-
logger.info('payouts processed: 0')
63+
logger.debug('payouts processed: 0')
6464
return
6565

6666
update_count = 0
@@ -75,7 +75,7 @@ def pull(self, **kwargs):
7575
# debug, only process one payout
7676
# break
7777

78-
logger.info('payouts processed: %s', update_count)
78+
logger.debug('payouts processed: %s', update_count)
7979

8080
def read(self, **kwargs):
8181
"""Returns a set of Square Payouts.
@@ -135,7 +135,7 @@ def update_payout(self, payout):
135135
updated_at = payout.get('updated_at')
136136

137137
# log the update
138-
logger.info('update_payout %s: %s', payout_id, updated_at.isoformat()[0:16])
138+
logger.debug('update_payout %s: %s', payout_id, updated_at.isoformat()[0:16])
139139

140140
# apply payout customizations
141141
self.apply_payout_customizations(payout)
@@ -204,7 +204,7 @@ def pull(self, payout_id: str) -> None:
204204

205205
# end if no payout entries
206206
if not payout_entries or len(payout_entries) == 0:
207-
logger.info('payout entries processed: 0')
207+
logger.debug('payout entries processed: 0')
208208
return
209209

210210
update_count = 0
@@ -216,7 +216,7 @@ def pull(self, payout_id: str) -> None:
216216
# debug, only process one payout
217217
# break
218218

219-
logger.info('payout entries processed: %s', update_count)
219+
logger.debug('payout entries processed: %s', update_count)
220220

221221
def read(self, payout_id: str) -> list:
222222
"""Returns a set of Square Payout Entries.
@@ -299,14 +299,3 @@ def apply_payout_entry_customizations(self, payout_entry: dict):
299299
# logger.debug('Applying default customizations: %s', self.collection_name)
300300

301301
return
302-
303-
if __name__ == '__main__':
304-
# setup logging
305-
logger = Logger(__name__).get_logger()
306-
307-
# collection = 'square_payouts'
308-
logger.info('working')
309-
310-
square_payouts = Payouts()
311-
# square_payouts.mdb.square_payout_itemizations.drop()
312-
square_payouts.pull(begin_str='2024-03-05', thru_str='2024-03-11')

0 commit comments

Comments
 (0)