Provides the methods used to log messages.
Namespace: AGI.Parallel.Infrastructure.Logging
Assembly: AGI.Parallel.Infrastructure (in AGI.Parallel.Infrastructure.dll) Version: 1.2.0.275 (1.2.0.275)

Syntax

C#
public interface ILog
Visual Basic
Public Interface ILog

Examples

  Copy imageCopy
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 Scalability 1.2\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");
            }
        }
    }
}

See Also