Skip to content

Commit

Permalink
#87: URL added to logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bystroushaak committed Feb 12, 2017
1 parent 15bbd03 commit f70b0e9
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 51 deletions.
64 changes: 19 additions & 45 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Changelog
=========

1.1.5
-----
- URL added to logging.

1.1.4
-----
- Fixed IP address for the structured logger.
Expand All @@ -23,55 +27,25 @@ Changelog
-----
- Attempt to remove ZODB/ZEO, because it is horribly broken.

1.0.6
-----
- Last attempt to pin requirements to older version.

1.0.5
-----
- #86: Added custom error log path / option to switch to stderr.

1.0.4
-----
- Fixed bug in error log path.

1.0.3
-----
- Dockerfile migrated to ubuntu 16.04.
- Removed duplicate line from MANIFEST.in.

1.0.2
-----
1.0.0 - 1.0.6
-------------
- Connected with Seeder. First officaly working, production ready version.
- Added better connection to Seeder.
- #85: Fixed bug in the whois parsing.
- #85: Updated API link for the memento web.
- Dockerfile migrated to ubuntu 16.04.
- Removed duplicate line from MANIFEST.in.
- Fixed bug in error log path.
- #86: Added custom error log path / option to switch to stderr.
- Last attempt to pin requirements to older version.

1.0.1
-----
- Added better connection to Seeder.

1.0.0
-----
- Connected with Seeder. First officaly working, production ready version.

0.4.5
-----
- #80: Language in 008 is now parsed from user input.

0.4.4
-----
- Template updated accordingly to #78.

0.4.3
-----
- ``conf/`` directory moved to ``templates/``.

0.4.2
-----
- Added `settings.ZEO_SERVER_PATH`.

0.4.1
-----
0.4.1 - 0.4.5
-------------
- Added missing MANIFEST.in.
- Added `settings.ZEO_SERVER_PATH`.
- ``conf/`` directory moved to ``templates/``.
- Template updated accordingly to #78.
- #80: Language in 008 is now parsed from user input.

0.4.0
-----
Expand Down
14 changes: 8 additions & 6 deletions src/wa_kat/rest_api/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ def get_cached_or_new(url, new=False):
Returns:
obj: :class:`RequestInfo` instance.
"""
garbage_collection()

old_req = DATABASE.get(url)

if old_req and not new:
Expand Down Expand Up @@ -86,19 +88,19 @@ def store_property(url, property_name, value):
This is part of the REST API.
"""
logger.debug(
"store_property(): Received url=%s property_name=%s value=%s" % (
url,
"store_property(): Received property_name=%s value=%s" % (
property_name,
value,
)
),
url=url,
)

ri = get_cached_or_new(url)
ri._set_property(property_name, json.loads(value))

logger.info(
"store_property(): Data for %s (property_name=%s) saved." % (
url,
"store_property(): property_name=%s saved." % (
property_name,
)
),
url=url,
)

0 comments on commit f70b0e9

Please sign in to comment.