ILog Interface |
Namespace: AGI.Parallel.Infrastructure.Logging
Name | Description | |
---|---|---|
Debug(Object) |
Log a message object with the Debug level.
| |
Debug(Object, Exception) |
Log a message object with the Debug level including the
stack trace of the System.Exception passed as a parameter.
| |
DebugFormat(String, Object) |
Logs a formatted message string with the Debug level.
| |
DebugFormat(String, Object) |
Logs a formatted message string with the Debug level.
| |
DebugFormat(String, Object, Object) |
Logs a formatted message string with the Debug level.
| |
Error(Object) |
Log a message object with the Error level.
| |
Error(Object, Exception) |
Log a message object with the Error level including the
stack trace of the System.Exception passed as a parameter.
| |
ErrorFormat(String, Object) |
Logs a formatted message string with the Error level.
| |
ErrorFormat(String, Object) |
Logs a formatted message string with the Error level.
| |
ErrorFormat(String, Object, Object) |
Logs a formatted message string with the Error level.
| |
Fatal(Object) |
Log a message object with the Fatal level.
| |
Fatal(Object, Exception) |
Log a message object with the Fatal level including the
stack trace of the System.Exception passed as a parameter.
| |
FatalFormat(String, Object) |
Logs a formatted message string with the Fatal level.
| |
FatalFormat(String, Object) |
Logs a formatted message string with the Fatal level.
| |
FatalFormat(String, Object, Object) |
Logs a formatted message string with the Fatal level.
| |
Info(Object) |
Log a message object with the Info level.
| |
Info(Object, Exception) |
Log a message object with the Info level including the
stack trace of the System.Exception passed as a parameter.
| |
InfoFormat(String, Object) |
Logs a formatted message string with the Info level.
| |
InfoFormat(String, Object) |
Logs a formatted message string with the Info level.
| |
InfoFormat(String, Object, Object) |
Logs a formatted message string with the Info level.
| |
Warn(Object) |
Log a message object with the Warn level.
| |
Warn(Object, Exception) |
Log a message object with the Warn level including the
stack trace of the System.Exception passed as a parameter.
| |
WarnFormat(String, Object) |
Logs a formatted message string with the Warn level.
| |
WarnFormat(String, Object) |
Logs a formatted message string with the Warn level.
| |
WarnFormat(String, Object, Object) |
Logs a formatted message string with the Warn level.
|
using System; using AGI.Parallel.Client; using AGI.Parallel.Infrastructure; using AGI.Parallel.Infrastructure.Logging; namespace CodeSamples { class Program { static void Main(string[] args) { using (IJobScheduler scheduler = new ClusterJobScheduler("localhost")) { scheduler.Connect(); Job job = scheduler.CreateJob(); job.AddTask(new WriteSomeToLog()); job.Submit(); job.WaitUntilDone(); } /* * Go to %ALLUSERSPROFILE%\AGI\STK Parallel Computing Server 2.9\logs to inspect the log files. */ } [Serializable] class WriteSomeToLog : Task { public override void Execute() { ILog logger = this.GetProperty<ILog>(TaskProperties.Logger); logger.Error("My text"); logger.Fatal("should appear"); logger.Fatal("in the file"); } } } }
STK Parallel Computing Server 2.9 API for .NET