File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ## 2.0.2
2+
3+ Enhance:
4+ - Added logger name
5+
16## 2.0.1
7+
28Issue:
39- Remove ` HTTP_VIA ` header support (unreliable IP information) (@yourcelf )
410
@@ -11,7 +17,7 @@ Enhance:
1117- Renamed the imported module from ` ipware ` to ` python_ipware ` in the ` python-ipware ` package.
1218 - Old usage: ` from ipware import IpWare `
1319 - New usage: ` from python_ipware import IpWare `
14-
20+
1521## 1.0.5
1622
1723- Enhance: Readme updates
Original file line number Diff line number Diff line change 1- __version__ = "2.0.1 "
1+ __version__ = "2.0.2 "
Original file line number Diff line number Diff line change 66IpAddressType = Union [ipaddress .IPv4Address , ipaddress .IPv6Address ]
77OptionalIpAddressType = Optional [IpAddressType ]
88
9+ logger = logging .getLogger (__name__ )
10+
911
1012class IpWareMeta :
1113 """
@@ -105,7 +107,7 @@ def get_ip_object(
105107 ip = ipaddress .IPv4Address (ipv4 )
106108 except ipaddress .AddressValueError :
107109 # not a valid IP address, return None
108- logging .info ("Invalid ip address. {0}" .format (ip_str ))
110+ logger .info ("Invalid ip address. {0}" .format (ip_str ))
109111 ip = None
110112 return ip
111113
@@ -324,7 +326,7 @@ def get_best_ip(
324326 """
325327
326328 if not ip_list :
327- logging .warning ("Invalid ip list provided." )
329+ logger .warning ("Invalid ip list provided." )
328330 return None , False
329331
330332 # the incoming ips match our trusted proxy list
You can’t perform that action at this time.
0 commit comments