<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Logging on Aaron&#39;s Worthless Words</title>
    <link>https://a996c8ee.aww-3cz.pages.dev/tags/logging/</link>
    <description>Recent content in Logging on Aaron&#39;s Worthless Words</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Wed, 15 Mar 2023 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://a996c8ee.aww-3cz.pages.dev/tags/logging/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Sending Slack Messages with Python</title>
      <link>https://a996c8ee.aww-3cz.pages.dev/posts/2023/03/sending-slack-messages-with-python/</link>
      <pubDate>Wed, 15 Mar 2023 00:00:00 +0000</pubDate>
      <guid>https://a996c8ee.aww-3cz.pages.dev/posts/2023/03/sending-slack-messages-with-python/</guid>
      <description>&lt;p&gt;Here&amp;rsquo;s a quick summary of what we&amp;rsquo;ve talked about in the last few posts &amp;ndash; all with &lt;a href=&#34;https://www.python.org/&#34;&gt;Python&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;We&amp;rsquo;ve &lt;a href=&#34;https://aconaway.com/2022/12/11/querying-netbox-with-pynetbox/&#34;&gt;asked Netbox to provide some info&lt;/a&gt; using &lt;a href=&#34;https://pynetbox.readthedocs.io/en/latest/&#34;&gt;pynetbox&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;We&amp;rsquo;ve &lt;a href=&#34;https://aconaway.com/2023/01/17/adding-stuff-to-netbox-with-pynetbox/&#34;&gt;added stuff to Netbox&lt;/a&gt; using pynetbox.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;We&amp;rsquo;ve &lt;a href=&#34;https://aconaway.com/2023/01/25/updating-stuff-on-netbox-with-pynetbox/&#34;&gt;updated&lt;/a&gt; and &lt;a href=&#34;https://aconaway.com/2023/02/24/deleting-stuff-from-netbox-with-pynetbox/&#34;&gt;deleted stuff&lt;/a&gt; in Netbox using pynetbox.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;We&amp;rsquo;ve &lt;a href=&#34;https://aconaway.com/2023/02/26/using-python-logging-to-figure-out-what-you-did-wrong/&#34;&gt;logged our messages with Python logging&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;This is all fine and dandy, but I would guess that you&amp;rsquo;re not the only engineer in the company and production maintenance scripts don&amp;rsquo;t run off of your laptop. We need a way to let a group of people know what&amp;rsquo;s happening when one of your scripts is run. And please don&amp;rsquo;t say email. Email has been worthless for alerting for over a decade, and there are better ways to do it. Search your feelings&amp;hellip;you know it to be true!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Using Python Logging to Figure Out What You Did Wrong</title>
      <link>https://a996c8ee.aww-3cz.pages.dev/posts/2023/02/using-python-logging-to-figure-out-what-you-did-wrong/</link>
      <pubDate>Sun, 26 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://a996c8ee.aww-3cz.pages.dev/posts/2023/02/using-python-logging-to-figure-out-what-you-did-wrong/</guid>
      <description>&lt;p&gt;As a warning to everyone, I am not a developer. I am a network engineer who is trying to do some automation stuff. Some of what I’m doing sounds logical to me, but I would not trust my own opinions for production work. I’m sure you can find a Slack channel or Mastodon instance with people who can tell you how to do things properly.&lt;/p&gt;&#xA;&lt;p&gt;I use too many print statements to figure out what&amp;rsquo;s going on. Get an object and print it to screen to make sure it&amp;rsquo;s right. Do a calculation and print the result. There are so many print statements in my code that I had to start using a debug variable to tell it when to print stuff. I even use that technique in my functions.&lt;/p&gt;</description>
    </item>
    <item>
      <title>A Better (?) Way to Handle Logs</title>
      <link>https://a996c8ee.aww-3cz.pages.dev/posts/2009/01/a-better-way-to-handle-logs/</link>
      <pubDate>Mon, 19 Jan 2009 00:00:00 +0000</pubDate>
      <guid>https://a996c8ee.aww-3cz.pages.dev/posts/2009/01/a-better-way-to-handle-logs/</guid>
      <description>&lt;p&gt;Happy new year, all.  I&amp;rsquo;m finally over my hangover from the party and ready to blog.&lt;/p&gt;&#xA;&lt;p&gt;Everywhere I go, I always wind up in a debate about how to alert on log messages as they come in.  I was at the grocery store yesterday, and the cashier told me that she had a list of log messages that she watched for, and, if she saw one of them, she sent an email.  I asked her what she would do if she got a log message that she had never seen before, and she said that she would have to find it first, then research the message and put in an alert for the next time it showed up.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
