Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
app_code ディレクトリ内のクラスの関数から Trace.Warn ステートメントを正常に実行できた人はいますか? 運がなかったので、それが可能かどうか疑問に思っています。
(まあ、それは可能だと確信しています。方法を理解する必要があるだけです)
はい、できます。
やってみました:
HttpContext.Current.Trace.Warn("message");
web.configでトレースを有効にする必要があることに注意してください
<trace enabled="true" pageOutput="true" mostRecent="true"/>