<p dir="auto">Not sure how much room there is to improve this, but the error message for the following user error doesn't provide much information about where the error occurs:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; struct Inner{T}
           x::T
       end

julia&gt; struct Outer{T}
           y1::Inner{T}
           y2::Inner{T}
           y3:Inner{T} # This single colon is where the user error occurs
       end
ERROR: UndefVarError: T not defined
Stacktrace:
 [1] top-level scope at REPL[2]:1"><pre class="notranslate"><code class="notranslate">julia&gt; struct Inner{T}
           x::T
       end

julia&gt; struct Outer{T}
           y1::Inner{T}
           y2::Inner{T}
           y3:Inner{T} # This single colon is where the user error occurs
       end
ERROR: UndefVarError: T not defined
Stacktrace:
 [1] top-level scope at REPL[2]:1
</code></pre></div>
<p dir="auto">This occurs for me on:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Julia Version 1.4.1
Commit 381693d3df (2020-04-14 17:20 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin19.3.0)
  CPU: Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-8.0.1 (ORCJIT, skylake)"><pre class="notranslate"><code class="notranslate">Julia Version 1.4.1
Commit 381693d3df (2020-04-14 17:20 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin19.3.0)
  CPU: Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-8.0.1 (ORCJIT, skylake)
</code></pre></div>
<p dir="auto">As <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/StefanKarpinski/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/StefanKarpinski">@StefanKarpinski</a> noted <a href="https://github.com/kmsquire/Logging.jl/issues/19#issuecomment-97455706" data-hovercard-type="issue" data-hovercard-url="/kmsquire/Logging.jl/issues/19/hovercard">here</a>, it would be nice to have (very basic) logging as part of Base, which logs messages to output (STDOUT or other).  This could then be extended by packages to add more complicated logging features (syslog, etc.).</p>
<p dir="auto">Some ideas:</p>
<ul dir="auto">
<li>Use/add standard log level functions (<code class="notranslate">info</code>, <code class="notranslate">warn</code>, <code class="notranslate">error</code>, <code class="notranslate">debug</code>, <code class="notranslate">critical</code>) to <code class="notranslate">Base</code>, perhaps wrapped in a module (<code class="notranslate">Logging.info</code>, <code class="notranslate">Logging.debug</code>, etc.)</li>
<li>Define a new interface with a single <code class="notranslate">log</code> function (<code class="notranslate">Logging.log(DEBUG, "some debug message"); Logging.log(INFO, "Here's some info")</code>, etc.)</li>
</ul>
<p dir="auto">Thoughts?  If we go with the first idea above, I would propose to move <code class="notranslate">Logging.jl</code> to the <code class="notranslate">JuliaLang</code> organization as a start.</p>
<p dir="auto">For additional reference and ideas, current logging packages include my <a href="https://github.com/kmsquire/Logging.jl"><code class="notranslate">Logging.jl</code></a> and <a href="https://github.com/forio/Lumberjack.jl"><code class="notranslate">Lumberjack.jl</code></a>.</p>