CK.Core.Tests.Monitoring.DocumentationCodeSnippets.DemoLogs C# (CSharp) Method

DemoLogs() public method

public DemoLogs ( IActivityMonitor m, FileInfo f, Exception ex ) : void
m IActivityMonitor
f System.IO.FileInfo
ex System.Exception
return void
        void DemoLogs( IActivityMonitor m, FileInfo f, Exception ex )
        {
            m.Trace().Send( "Data from '{0}' processed.", f.Name );
            m.Info().Send( ex, "An error occurred while processing '{0}'. Process will be retried later.", f.Name );
            m.Warn().Send( "File '{0}' is too big ({1} Kb). It must be less than 50Kb.", f.Name, f.Length / 1024 );
            m.Error().Send( ex, "File '{0}' can not be processed.", f.Name );
            m.Fatal().Send( ex, "This will cancel the whole operation." );
        }