title: Scala: Retrieve class-name from ClassTag
body: <p>I'm writing a <em>generic method</em> that can convert <code>Any</code> type argument to the an object of passed <code>ClassTag[T]</code> type, if possible.</p>
  
  <pre><code>def getTypedArg[T: ClassTag](any: Any): Option[T] = {
        any match {
          case t: T =&gt; Some(t)
          case invalid =&gt;
            logger.warn(s"Invalid argument: $invalid")
            None
        }
  }
  </code></pre>
  
  <p>I want the <em>log message</em> to be more <em>precise</em> like this:</p>
  
  <pre><code>case invalid =&gt; logger.warn(s"Invalid argument: $invalid of type $className")
  </code></pre>
  
  <hr>
  
  <p>How can I retrieve <code>className</code> from the <code>ClassTag[T]</code>?  </p>
  
  <p>Alternatively, is there a fundamentally different approach that can serve my use-case better?</p>