We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4c6460 commit a687eb0Copy full SHA for a687eb0
logging/logging_papertrail.py
@@ -0,0 +1,19 @@
1
+import logging
2
+from logging.handlers import SysLogHandler
3
+
4
+PAPERTRAIL_HOST = 'mylogs_host_address.com'
5
+PAPERTRAIL_PORT = 37554
6
7
+def main() -> None:
8
9
+ # logging.basicConfig(level=logging.DEBUG)
10
+ logger = logging.getLogger('paulcodes')
11
+ logger.setLevel(logging.DEBUG)
12
+ handler = SysLogHandler(address=(PAPERTRAIL_HOST, PAPERTRAIL_PORT))
13
+ logger.addHandler(handler)
14
+ logger.debug("This is a debg message")
15
16
17
+if __name__ == '__main__':
18
+ main()
19
0 commit comments