Quantcast
Channel: patterns & practices – Enterprise Library
Viewing all 1928 articles
Browse latest View live

New Post: Asynchronous Logging in .NET Application

$
0
0
As you mention Enterprise Library supports async logging. To log asynchronously is just a matter of setting the XML configuration to be async (or wrapping a trace listener in an AsynchronousTraceListenerWrapper if using programmatic configuration). Here is the relevant section of the Developers Guide: http://msdn.microsoft.com/en-us/library/dn440731(v=pandp.60).aspx#sec23.

If you download the reference documents there is some additional information:
You can use the asynchronous trace listener in the same way that you would use the wrapped listener in your code.

The AsynchronousTraceListenerWrapper constructor has three optional parameters in addition to the wrapped listener.

ownsWrappedListener. Indicates whether the wrapper should dispose the wrapped trace listener.
bufferSize. Size of the buffer for asynchronous requests.
maxDegreeOfParallelism. The maximum degree of parallelism for thread safe listeners.
disposeTimeout. The timeout for waiting to complete buffered requests when disposing. When null (the default) the timeout is infinite.
If the buffer overflows, you may lose some messages.
In terms of losing messages during application shutdown you can configure the disposeTimeout and ensure in your application that LogWriters are disposed during an orderly shutdown. However, there is no deterministic guarantee that all messages in the buffer will be written (e.g. power failure, crash, etc.).

Another scenario in which messages could be lost is if the buffer is full. Async logging is handled by a long running task and does not spawn a thread for each message so monitoring the thread pool is not useful.

However, if you configure the errors special source you should be able to capture that event along with the original information. The errors special source could use an email trace listener to send emails to support team (for all logging errors) Here is a (sanitized) example of what you would see:
----------------------------------------
Logging Errors & Warnings Error: 6352 : Timestamp: 12/2/2014 1:23:03 PM
Message: Tracing to LogSource 'General' failed. Processing for other sources will continue. See summary information below for more information. Should this problem persist, stop the service and check the configuration file(s) for possible error(s) in the configuration of the categories and sinks.


Summary for Enterprise Library Distributor Service:
======================================
--> 
Message: 
Timestamp: 12/2/2014 1:23:03 PM
Message: Test
Category: General
Priority: -1
EventId: 1
Severity: Information
Title:
ProcessId: 7420
Thread Name: 
Win32 ThreadId:6780
Extended Properties: 
--> TimeStamp: 12/2/2014 1:23:03 PM
--> FullName: Microsoft.Practices.EnterpriseLibrary.Logging, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

Exception Information Details:
======================================
Exception Type: System.InvalidOperationException
Message: The capacity for the asynchronous trace listener named '' is exhausted.
Data: System.Collections.ListDictionaryInternal
TargetSite: Void AddRequest(System.Action`1[System.Diagnostics.TraceListener])
HelpLink: NULL
Source: Microsoft.Practices.EnterpriseLibrary.Logging
HResult: -2146233079

StackTrace Information Details: 
======================================
   at Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.AsynchronousTraceListenerWrapper.AddRequest(Action`1 request)
   at Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.AsynchronousTraceListenerWrapper.TraceData(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, Object data, ReportTracingError reportError)
   at Microsoft.Practices.EnterpriseLibrary.Logging.LogSource.TraceData(TraceEventType eventType, Int32 id, LogEntry logEntry, TraceListenerFilter traceListenerFilter, TraceEventCache traceEventCache, ReportTracingError reportError)
Category: 
Priority: -1
EventId: 6352
Severity: Error
Title:
ProcessId: 7420
Thread Name: 
Win32 ThreadId:6780
Extended Properties: 
----------------------------------------
If you require that a message is guaranteed to be logged (e.g. regulatory auditing) then a fire and forget approach is probably not the best.

Also If you are starting from scratch you may want to look at the Semantic Logging Application Block.

~~
Randy Levy
entlib.support@live.com
Enterprise Library support engineer
Support How-to

New Post: Modify sourceLevel programatically Logging

$
0
0
Here is a similar example using Enterprise Library 6 programmatic configuration (and reconfiguration):
publicsealedclass LoggingConfigurator
{
    privatestaticreadonly Lazy<LoggingConfigurator> lazy =
        new Lazy<LoggingConfigurator>(() => new LoggingConfigurator());

    private LogWriter currentLogWriter;

    private LoggingConfigurator()
    {
        Initialize(SourceLevels.Error);
    }

    publicstatic LoggingConfigurator Instance
    {
        get
        {
            return lazy.Value;
        }
    }

    publicvoid SetSourceLevels(SourceLevels level)
    {
        this.currentLogWriter.Configure(cfg =>
        {
            foreach (var logSource in cfg.LogSources)
            {
                logSource.Level = level;
            }
        });
    }

    public LogWriter GetLogWriter()
    {
        returnthis.currentLogWriter;
    }

    privatevoid Initialize(SourceLevels level)
    {
        // Formatter
        TextFormatter briefFormatter = new TextFormatter("{message}    Timestamp: {timestamp}...{newline}"); ;

        // Trace Listenervar flatFileTraceListener = new FlatFileTraceListener(
            @"trace.log",
            "----------------------------------------", 
            "----------------------------------------", 
            briefFormatter);

        // Build Configurationvar config = new LoggingConfiguration();

        config.AddLogSource("General", level, true)
            .AddTraceListener(flatFileTraceListener);

        this.currentLogWriter = new LogWriter(config);
    }
}
// Get singletonvar loggingConfigurator = LoggingConfigurator.Instance;

// LogWriter will also be a singleton
LogWriter logger = loggingConfigurator.GetLogWriter();

// This does not log since the default level set in LoggingConfiguration is Error
logger.Write("loggerNoLog", "General", 0, 0, TraceEventType.Information);

// Change our logging level from Error to Verbose
loggingConfigurator.SetSourceLevels(SourceLevels.Verbose);

// Since the logging level is now set to Verbose Information messages will now log// without getting a new LogWriter since logger is the same LogWriter instance that was reconfigured
logger.Write("loggerWillLog", "General", 0, 0, TraceEventType.Information);
Some notes:
  • This is slightly different than the first example since only one LogWriter instance is created, returned and modified (which is more of a typical use case).
  • In this simpler approach a LoggingConfigurator seems like overkill (LogWriter.Configure is thread-safe so we don't need to take that into account). Basically at any time Configure can be called on the LogWriter.
See Reconfiguring Logging at Run Time.

~~
Randy Levy
entlib.support@live.com
Enterprise Library support engineer
Support How-to

New Post: Deploying to IIS web server

$
0
0
I am my code working locally fine, but when deploying to IIS it seems to be throwing errors causing my application to stop the Application Pool.
In my Global.asax.cs class I have:
 protected void Application_Start(object sender, EventArgs e)
        {
            ConnectionString = ConfigurationManager.ConnectionStrings["AppConnectionString"].ConnectionString;
            
            listener = new DatabaseEventListener("AppLogQueue", ConnectionString, SqlClientFactory.Instance, TimeSpan.FromSeconds(Convert.ToDouble(ConfigurationManager.AppSettings["LogBufferInterval"])), 0);
            listener.EnableEvents(SemanticLoggingEventSource.Log, EventLevel.LogAlways, Keywords.All);
            
        }
and in my SemanticLoggingSource.cs file I have the following method:
  public static SemanticLoggingEventSource Log { get; private set; }

      [Event(100, Level = EventLevel.Error, Keywords = Keywords.EventListener, Message = "{0}" )]
        internal void DatabaseEventListenerError(string message, string SessionId=null)
        {
            if (this.IsEnabled())
            {
                this.WriteEvent(100, message, SessionId);
            }
        }
which can get called by errors in my application as so:
   SemanticLoggingEventSource.Log.DatabaseEventListenerError(LogMessage, sessionId);
As I said this works fine locally and logs my errors in the database but when deploying on the webserver IIS7, I can't even get the application to run. It starts with a service unavailable 503 and I notice the AppPool has been stopped. If I revert all the SemanticLogging code all works fine. What seems to be the block on my webserver to prevent it from running?

New Post: Exception Handling on Class Library

$
0
0
Currently I have a class library project, can I implement the exception handling policy on class library? How to implement it?

New Post: Exception in QuickStarts

$
0
0
In my case, the library was copied to the Unit Test bin folder, but not resolved.
I had to use the Saran solution which is to add a statement of the type in a class of the assembly :
using Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging;

public class CallAssemblies
{
    private static LoggingExceptionHandler loggingExceptionHandler = null;
}

New Post: Does EL Logging have hard dependency to Newtonsoft.Json.dll?

$
0
0
You have to include the /lib:"path to newtonsoft.json here" switch for ILMerge to find it.

I had the same issue and this resolved it.

New Post: Exception Handling on Class Library

$
0
0
I assume you mean you want to configure the class library to use Exception Handling. The usual (and easiest) approach to .NET configuration is to place the required configuration in app/web.config.

If that does not work for your scenario you could manually load the configuration using a FileConfigurationSource with an expected configuration file (or user defined). This could be setup with a bootstrap method that should be called before using the library. Or to try to load automatically you could try some of the more esoteric solutions provided to this question: Initialize library on Assembly load.

~~
Randy Levy
entlib.support@live.com
Enterprise Library support engineer
Support How-to

New Post: Deploying to IIS web server

$
0
0
It sounds like an exception is being thrown. Can you capture any startup exceptions and log them using another means (e.g. Eventlog) to identify the error? Or set <customErrors mode="Off" /> to get a stacktrace?

If I were to guess it would be that some of the configuration information is not set properly on the webserver (e.g. LogBufferInterval not set causing conversion to double to fail or perhaps AppConnectionString not defined causing a NullReferenceException).

~~
Randy Levy
entlib.support@live.com
Enterprise Library support engineer
Support How-to

Created Unassigned: Validator under ruleset in configuration [33837]

$
0
0
We are in the process of updating EntLib3 to EntLib6 for a legacy application. In the app.config file exists a large amount of xml configuration for the EnterpriseLibrary.Validation package. When ValidateChildren is called on a userControl I get the following exception: 'unrecognized element validator' on the following piece of configuration:

```
<ruleset name="Application Entity Rule Set">
<validator messageTemplate=""
messageTemplateResourceName=""
messageTemplateResourceType=""
tag="required"
type="Pbc.IP.Administration.Infrastructure.Interface.CustomValidators.ApplicationValidator, Infrastructure.Interface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="Application Entity Custom Validator"/>
</ruleset>
```

There are several more validators throughout the config that also live directly under the ruleset element and also produce the same error. The same config works fine in EntLib3.0 and this configuration also appears to be legal according to the definition of a ruleset here: http://msdn.microsoft.com/en-us/library/ff664393(v=pandp.50).aspx

Can anyone help me determine where I am going wrong or is this possibly a bug in EntLib6?

Commented Unassigned: Validator under ruleset in configuration [33837]

$
0
0
We are in the process of updating EntLib3 to EntLib6 for a legacy application. In the app.config file exists a large amount of xml configuration for the EnterpriseLibrary.Validation package. When ValidateChildren is called on a userControl I get the following exception: 'unrecognized element validator' on the following piece of configuration:

```
<ruleset name="Application Entity Rule Set">
<validator messageTemplate=""
messageTemplateResourceName=""
messageTemplateResourceType=""
tag="required"
type="Pbc.IP.Administration.Infrastructure.Interface.CustomValidators.ApplicationValidator, Infrastructure.Interface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="Application Entity Custom Validator"/>
</ruleset>
```

There are several more validators throughout the config that also live directly under the ruleset element and also produce the same error. The same config works fine in EntLib3.0 and this configuration also appears to be legal according to the definition of a ruleset here: http://msdn.microsoft.com/en-us/library/ff664393(v=pandp.50).aspx

Can anyone help me determine where I am going wrong or is this possibly a bug in EntLib6?
Comments: The posted configuration does not work under EntLib 5 or 6 (I didn't test V4). However, if you change the validator element tag (<validator>) to add it should be fine. Create configuration with validator: ``` xml <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="validation" type="Microsoft.Practices.EnterpriseLibrary.Validation.Configuration.ValidationSettings, Microsoft.Practices.EnterpriseLibrary.Validation, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" /> </configSections> <validation> <type name="Validation_Ruleset_Validator_33837.Person" defaultRuleset="Validation Ruleset" assemblyName="Validation_Ruleset_Validator_33837, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"> <ruleset name="Validation Ruleset"> <add type="Microsoft.Practices.EnterpriseLibrary.Validation.Validators.NotNullValidator, Microsoft.Practices.EnterpriseLibrary.Validation, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="Not Null Validator" /> </ruleset> </type> </validation> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> </startup> </configuration> ``` And code: ``` c# ValidationFactory.SetDefaultConfigurationValidatorFactory( new SystemConfigurationSource()); Person p = null; var vrs = ValidationFactory.CreateValidator<Person>().Validate(p); ``` Will result in a "The value cannot be null." ValidationResult being returned.

Commented Unassigned: Validator under ruleset in configuration [33837]

$
0
0
We are in the process of updating EntLib3 to EntLib6 for a legacy application. In the app.config file exists a large amount of xml configuration for the EnterpriseLibrary.Validation package. When ValidateChildren is called on a userControl I get the following exception: 'unrecognized element validator' on the following piece of configuration:

```
<ruleset name="Application Entity Rule Set">
<validator messageTemplate=""
messageTemplateResourceName=""
messageTemplateResourceType=""
tag="required"
type="Pbc.IP.Administration.Infrastructure.Interface.CustomValidators.ApplicationValidator, Infrastructure.Interface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="Application Entity Custom Validator"/>
</ruleset>
```

There are several more validators throughout the config that also live directly under the ruleset element and also produce the same error. The same config works fine in EntLib3.0 and this configuration also appears to be legal according to the definition of a ruleset here: http://msdn.microsoft.com/en-us/library/ff664393(v=pandp.50).aspx

Can anyone help me determine where I am going wrong or is this possibly a bug in EntLib6?
Comments: That worked great! Thanks.

New Post: IsolatedStorageTraceListenerData: The repository is not available

$
0
0
That's frustrating. We're using this to capture client-side errors for thousands of users, but it means that we'll miss some.

Reviewed: Enterprise Library 5.0 - April 2010 (十二月 11, 2014)

$
0
0
Rated 4 Stars (out of 5) - shuibian Look look

New Post: What happened with the Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ContainerModel namespace?

$
0
0
Hi all

I'm trying to extend Enterprise Library and I'm following the hands-on lab found here:
http://www.microsoft.com/en-us/download/details.aspx?id=13738
The lab uses Enterprise Library 5, and in one project it uses the method ResolvedIfNotNull from the class Container that is located in the namespace cited in the subject.
But It looks like, in Enterprise Library 6, this namespace doesn't exists anymore.
What I want to know is if, in Enterprise Library 6, the class was renamed or the method ResolvedIfNotNull is located in another class.

Thanks for your attention.

New Post: What happened with the Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ContainerModel namespace?

$
0
0
From the Release Notes:
The EnterpriseLibraryContainer class no longer exists. You must now explicitly bootstrap the blocks in your code now that Enterprise Library no longer relies on Unity to perform this function.
This applies to the ContainerModel as well since a container is no longer used.

There are Hands-On Labs for Microsoft Enterprise Library 6 but I don't think anything specifically for extensibility. One approach is to take a look at the EntLib source code to model the classes. The core interfaces haven't changed but configuration classes are different (e.g. GetRegistrations is no longer used).

What are you trying to achieve?

~~
Randy Levy
entlib.support@live.com
Enterprise Library support engineer
Support How-to

New Post: What happened with the Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ContainerModel namespace?

$
0
0
Hi Randy

I've created a custom trace listener to log errors to a WCF service.
It's works already, but I'm trying to make it work like this:
<loggingConfiguration name="" tracingEnabled="true" defaultCategory="General">
        <listeners>
            <add listenerDataType="MyLib.MyWcfTraceListenerData, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
                property1="value1" property2="value2" type="MyLib.MyWcfTraceListener, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
                name="WcfTraceListener" formatter="Text Formatter" />
        </listeners>
</loggingConfiguration>
Currently the values for property1 and property2 are being stored as <appSettings>.
The class MyWcfLoggerData extends TraceListenerData and overrides the function GetCreationExpression as follows:
  protected override Expression<Func<TraceListener>> GetCreationExpression()
        {
            return () => new MyWcfTraceListener(Container.ResolvedIfNotNull<ILogFormatter>(Formatter),
                                                                         Property1,
                                                                         Property2);
        }
Looks like the lab example relies to some DI container to obtain an instance of the formatter.
How can I replace the Container.ResolvedIfNotNull call?

New Post: What happened with the Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ContainerModel namespace?

$
0
0
The approach in version 6 is simplified because instead of overriding GetCreationExpression and creating an Expression<Func<TraceListener>> you override TraceListenerData.CoreBuildTraceListener() and just return the actual TraceListener instance. For example:
protectedoverride TraceListener CoreBuildTraceListener(LoggingSettings settings)
{
    ILogFormatter formatter = this.BuildFormatterSafe(settings, this.Formatter);

    returnnew MyWcfTraceListener(formatter,
        this.Property1,
        this.Property2);
}
I would recommend looking at the sample trace listeners on the Enterprise Library V6 Sample Projects page (Custom Database Trace Listener Sample and Rolling XML Trace Listener Sample & (Rolling) Flat File Trace Listeners). The samples contain full integration examples.

~~
Randy Levy
entlib.support@live.com
Enterprise Library support engineer
Support How-to

New Post: Semantic Logging Out of process custom sink not logging large size data

$
0
0
Hi Team,

Below is the custom sink code for log data into log file(blob). This is working fine for bigger size string when we run it as in process. but when I tried running this in out of process, it throwing proxy authentication error 407.


see my bcustom sink code. kindly help me to fix.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Practices.EnterpriseLibrary.SemanticLogging;
using Microsoft.Practices.EnterpriseLibrary.SemanticLogging.Formatters;
using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Blob;
using System.Globalization;
using System.IO;
using Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling;
using Microsoft.WindowsAzure.Storage.RetryPolicies;

namespace SemanticLogging.CustomSink
{
public class AzureBlobSink : IObserver<EventEntry> 
{

    private readonly IEventTextFormatter _formatter;

    private string ConnectionString { get; set; }

    private string ContainerName { get; set; }

    private string BlobName { get; set; }



    public AzureBlobSink(string connectionString, string containerName, string blobname)
    {
        this.ConnectionString = connectionString;
        this.ContainerName = containerName;
        this.BlobName = blobname;
        _formatter = new EventTextFormatter();
    }

    public void OnCompleted()
    {
        //throw new NotImplementedException();
        //base.Dispose();
    }

    public void OnError(Exception error)
    {
        //throw new NotImplementedException();
        SemanticLoggingEventSource.Log.CustomSinkUnhandledFault("Exception: " + error.Message + Environment.NewLine + "Stack trace:" + error.StackTrace + Environment.NewLine + "Inner Exception" + error.InnerException + Environment.NewLine);
    }

    public void OnNext(EventEntry value)
    {
        if (value != null)
        {
            using (var writer = new StringWriter())
            {
                _formatter.WriteEvent(value, writer);
                Postdata(Convert.ToString(writer), BlobName);
            }
        }
    }

    /// <summary>
    /// create container and upsert block blob content
    /// </summary>
    /// <param name="content"></param>
    private void Postdata(string content, string blobname)
    {
        List<string> blockIds = new List<string>();
        var bytesToUpload = Encoding.UTF8.GetBytes(content);

        try
        {
            using (MemoryStream stream = new MemoryStream(Encoding.UTF8.GetBytes(content)))
            {
                CloudStorageAccount account = CloudStorageAccount.Parse(ConnectionString);
                CloudBlobClient blobClient = account.CreateCloudBlobClient();
                //linear Retry Policy create a blob container 10 times. The backoff duration is 2 seconds 
                IRetryPolicy linearRetryPolicy = new LinearRetry(TimeSpan.FromSeconds(2), 15);
                //exponential Retry Policy which retries the code to create a blob container 10 times.
                IRetryPolicy exponentialRetryPolicy = new ExponentialRetry(TimeSpan.FromSeconds(2), 15);
                blobClient.RetryPolicy = exponentialRetryPolicy;
                //
                CloudBlobContainer container = blobClient.GetContainerReference(ContainerName);
                container.CreateIfNotExists();
                CloudBlockBlob blob = container.GetBlockBlobReference(blobname + System.DateTime.UtcNow.ToString("MMddyyyy") + ".log");
                stream.Seek(0, SeekOrigin.Begin);

                if (!blob.Exists())
                {
                    using (var insertempty = new MemoryStream(Encoding.UTF8.GetBytes("")))
                    {
                        insertempty.Seek(0, SeekOrigin.Begin);
                        blob.UploadFromStream(insertempty);
                    }
                }

                blockIds.AddRange(blob.DownloadBlockList(BlockListingFilter.Committed).Select(b => b.Name));
                var newId = Convert.ToBase64String(Encoding.UTF8.GetBytes(blockIds.Count.ToString(CultureInfo.InvariantCulture).PadLeft(64, '0')), Base64FormattingOptions.None);
                //var newId = Convert.ToBase64String(Encoding.Default.GetBytes(blockIds.Count.ToString()));
                blob.PutBlock(newId, new MemoryStream(bytesToUpload), null);
                blockIds.Add(newId);
                blob.PutBlockList(blockIds);

            }
        }
        catch (Exception ex)
        {
            SemanticLoggingEventSource.Log.CustomSinkUnhandledFault("Exception: " + ex.Message + Environment.NewLine + "Stack trace:" + ex.StackTrace + Environment.NewLine + "Inner Exception" + ex.InnerException + Environment.NewLine);
            //logerror("Exception: " + ex.Message + Environment.NewLine + "Stack trace:" + ex.StackTrace + Environment.NewLine + "Inner Exception" + ex.InnerException + Environment.NewLine);
        }
    }

    private void logerror(string error)
    {
        Postdata(error, "semanticinprocesserrorlog");
    }

}
}




Below are the error message I received,


opcode: info
task: 65533
version: 0
Payload: [message : Exception: The remote server returned an error: (407) Proxy Authentication required.
Inner Exception: System.net.webException: The remote server returned an error: (407) Proxy authentication required.
at system.net.httpwebrequest.getresponse()
at microsoft.windowsazure.storage.core.executor.executor.executesync[t](storagecommandbase
'1 cmd, IRetryPolicy policy, OperationContext operationContext)]
Eventname: CustomSinkUnhandledFaultInfo
Timestamp: 2014-12-15T11:17:357353172z


Kindly help me to resolve.

New Post: What happened with the Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ContainerModel namespace?

$
0
0
Now It's working as expected.
Thanks Randy.

Created Unassigned: Semantic Logging Issue "string length greater than 32723" in Out of Process [33838]

$
0
0
Dear Randy,

I have created a discussion http://entlib.codeplex.com/discussions/574964.

To know what is causing issue while I logging string length more than 32723 in Out of Process.

Because I have created a class and the method for writing logs in to blob and it was working fine in “In-Process” type of logging with large length of allowable string data type.

But the same source code is converted as dll and placed in out-of-process semantic logging folder called via xml file through custom sink tag but unfortunately it was not logging large size string (>32723) and also it was not throwing (log) any error.

Initially it was throwing proxy error and I have fixed proxy error by put some code and now it is running fine.

Be simple, Out-of-Process is not logging payload string which is having length more than 32723.

I’m using Event level as Log always.

Also I’m using semantic logging custom sink unhandled fault method to write logs when exception happen in a method. Error logging is not happen. 

SemanticLoggingEventSource.Log.CustomSinkUnhandledFault()

If I’m using above code , definitely this should get some error log when method is throwing error. Am I right?

Moreover , How to disable events and close the listener in custom sink out of process. Please guide me.

Share me the event life cycle of the Semantic Logging custom sink.

1. OnCompleted – Not implemented
2. OnError – Here I’m calling custom sink unhandled fault()
3. OnNext – Here I’m calling my own method for writing logs to blob

Kindly expedite and I Need your help.
Viewing all 1928 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>