私は、System.ThreadsとTimersを使用してx分ごとにClassのインスタンスを作成するWindowsサービスを持っています。servicecallが動作するmainclassにログインしますが、クラスと呼ばれるものはログに記録できません。出力が得られません。log4net:Loggingはメインクラスでのみ動作します
はmainclassの私の枠組みを厥:
/// <summary>
/// Create an Instance of the Log
/// </summary>
private static readonly ILog logger = LogManager.GetLogger("Test");
/// <summary>
/// Get the Instance of the Log
/// </summary>
internal static ILog log
{
get { return logger; }
}
私は今、他のクラスservice.logに参照の外に呼び出し、ログを書き込むしようとした場合、例えばService.log.Info(「テスト」) ;何も起きません。私はどちらか任意の出力を得ることはありません
/// <summary>
/// Create an Instance of the Log
/// </summary>
private static readonly ILog logsomething = LogManager.GetLogger("Test");
を使用することにより、第二クラス内のログの新しいインスタンスを作成しようと
、それだけmainclassで動作します。他のスレッド化されたクラスでもうまく動作しません。私の設定はRollingFileAppenderに基づいています。
あなたの設定を投稿してくださいことはできますか? – gregwhitaker