Skip to content

Commit

Permalink
Adds a title to this post
Browse files Browse the repository at this point in the history
  • Loading branch information
gwynforthewyn committed Aug 24, 2024
1 parent 363ffc2 commit 78086e5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<script type="text/javascript" src="/main.js"></script>
<title>Set Go SLog Levels With An Environment Variable</title>
<meta name="andrew-published-at" content="2024-08-22" </head>
<meta name="andrew-publish-time" content="2024-08-22" </head>

<body>
<nav class="navigation">
Expand All @@ -17,6 +17,7 @@
<main>
<article>
<section id="introduction">
<h1>Set go Slog Levels With An Environment Variable</h1>
<p>
The examples in the <a href="https://pkg.go.dev/log/slog">slog docs</a> are pretty convoluted. Setting a log level via an environment variable's actually
pretty simple. Here's the code. By default the code is silent, set <code>LOG_LEVEL</code> in your environment to one of the strings "INFO", "DEBUG", "WARN" or "ERROR"
Expand Down

0 comments on commit 78086e5

Please sign in to comment.