{{Quickfixn}} SPAMRe: SPAMRe: Acceptor is not log sessionotfound and exception socket

Sergio Diego Demaestri sdemaestri at mae.com.ar
Tue Mar 3 10:27:46 PST 2020


Mike,


I can see in the Client HandlerThread class that it creates a new file and that is where I see the error log that actually happens when using an unknown session. It does not throw errors into the upper layers and they are written in the created file.


public ClientHandlerThread(TcpClient tcpClient, long clientId, Dictionary settingsDict, SocketSettings socketSettings)
        {
            string fileLogPath = "log";
            if (settingsDict.Has("DebugFileLogPath"))
            {
                fileLogPath = settingsDict.GetString("DebugFileLogPath");
            }
            else if (settingsDict.Has("FileLogPath"))
            {
                fileLogPath = settingsDict.GetString("FileLogPath");
            }
            this.log_ = new FileLog(fileLogPath, new SessionID("ClientHandlerThread", clientId.ToString(), "Debug"));
            this.Id = clientId;
            this.socketReader_ = new SocketReader(tcpClient, socketSettings, this);
        }

My implementation is very simple.
I use a queue to log errors, incoming, outgoing and events

public sealed class CustomLogFactory : ILogFactory
    {

        public CustomLogFactory(SessionSettings settings)
        {

        }

        public ILog Create(SessionID sessionId)
        {
            try
            {
                return new CustomFileLog();
            }
            catch (Exception ex)
            {
                LoggingService.Instance.AgregarLog((MensajeEntity)new MensajesFixOutMD(string.Concat("OnCreate: ", ex.Message), TipoMensaje.Error));
                return null;
            }
        }

    }
    internal sealed class CustomFileLog : ILog
    {

        public CustomFileLog()
        {

        }

        public void Dispose()
        {

        }

        public void Clear()
        {

        }

        public void OnIncoming(string msg) {
            LoggingService.Instance.AgregarLog((MensajeEntity) new MensajesFixOutMD(string.Concat("OnIncoming: ",msg), TipoMensaje.Information)); //method call queue.Add
        }

        public void OnOutgoing(string msg) {
            LoggingService.Instance.AgregarLog((MensajeEntity) new MensajesFixOutMD(string.Concat("OnOutgoing: ", msg), TipoMensaje.Information)); //method call queue.Add
        }

        public void OnEvent(string s) { //never is call when session is unknow
            LoggingService.Instance.AgregarLog((MensajeEntity) new MensajesFixOutMD(string.Concat("OnEvent: ", s), TipoMensaje.Information)); //method call queue.Add
        }
    }

Using the DebugFileLogPath configuration I can see the errors in the files in the form ClientHandlerThread-XX-Debug.event.current.log but I cannot log them in the DB
Regards


De: Quickfixn <quickfixn-bounces at lists.quickfixn.com> En nombre de Mike Gatny
Enviado el: Tuesday, March 3, 2020 03:11 PM
Para: Mailing list for QuickFIX/n <quickfixn at lists.quickfixn.com>
Asunto: SPAMRe: {{Quickfixn}} SPAMRe: Acceptor is not log sessionotfound and exception socket

Errors are typically logged with OnEvent().
Can you post your Log and LogFactory implementation here?

--
Mike Gatny
Connamara Systems


On Tue, Mar 3, 2020 at 10:55 AM Sergio Diego Demaestri <sdemaestri at mae.com.ar<mailto:sdemaestri at mae.com.ar>> wrote:
Mike,

Thanks for your time.

I have made a custom class to log in DB as you indicated,
It works perfectly except in cases of unknown session and any problem with the socket.

I appreciate that these events are not being reported to the ILogFactory.

Any idea what the problem may be?

Regards.

Sergio
De: Quickfixn <quickfixn-bounces at lists.quickfixn.com<mailto:quickfixn-bounces at lists.quickfixn.com>> En nombre de Mike Gatny
Enviado el: Tuesday, March 3, 2020 12:36 PM
Para: Mailing list for QuickFIX/n <quickfixn at lists.quickfixn.com<mailto:quickfixn at lists.quickfixn.com>>
Asunto: SPAMRe: {{Quickfixn}} Acceptor is not log sessionotfound and exception socket

Sergio,

The ScreenLog and ScreenLogFactory are a good example of what you need to implement:

https://github.com/connamara/quickfixn/blob/master/QuickFIXn/ScreenLog.cs
https://github.com/connamara/quickfixn/blob/master/QuickFIXn/ScreenLogFactory.cs

--
Mike Gatny
Connamara Systems


On Tue, Mar 3, 2020 at 10:04 AM Sergio Diego Demaestri <sdemaestri at mae.com.ar<mailto:sdemaestri at mae.com.ar>> wrote:
Hi ,


I am working with quickfix.net.netcore 1.8.1 I built a CustomLogFactory class but when I can't find a session (sessonnotfound)
I don't see it registered in my log.

When an error happens with SSL, I don't see anything in the log either.

What interface do I need to overwrite?

Regards,


Sergio


Aviso de Confidencialidad: La información contenida en este E-mail es confidencial y sólo puede ser utilizada por el destinatario a quien está dirigido. Conforme artículo 318 del Código Civil y Comercial de la Nación, la correspondencia confidencial no puede ser utilizada sin consentimiento del remitente, y los terceros no pueden valerse de la correspondencia sin asentimiento del destinatario, y del remitente si es confidencial. Si no es el destinatario autorizado de este E-mail, no puede utilizar esta información sin consentimiento del remitente y cualquier retención, difusión, distribución o copia de este mensaje es prohibida y sancionada por la ley. Toda vez que la información remitida por este medio puede ser objeto de modificación o alteración, el emisor no se responsabiliza por errores u omisiones contenidos en este mensaje o sus anexos, ni garantiza la seguridad, exactitud de lo transmitido por este medio. Si por error ha recibido este E-mail, favor reenvíelo al remitente y borre el mensaje recibido inmediatamente
_______________________________________________
Quickfixn mailing list
Quickfixn at lists.quickfixn.com<mailto:Quickfixn at lists.quickfixn.com>
http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com

This email, along with any attachments, is confidential. If you believe you received this message in error, please contact the sender immediately and delete all copies of the message. Thank you from Connamara Systems, LLC.
Aviso de Confidencialidad: La información contenida en este E-mail es confidencial y sólo puede ser utilizada por el destinatario a quien está dirigido. Conforme artículo 318 del Código Civil y Comercial de la Nación, la correspondencia confidencial no puede ser utilizada sin consentimiento del remitente, y los terceros no pueden valerse de la correspondencia sin asentimiento del destinatario, y del remitente si es confidencial. Si no es el destinatario autorizado de este E-mail, no puede utilizar esta información sin consentimiento del remitente y cualquier retención, difusión, distribución o copia de este mensaje es prohibida y sancionada por la ley. Toda vez que la información remitida por este medio puede ser objeto de modificación o alteración, el emisor no se responsabiliza por errores u omisiones contenidos en este mensaje o sus anexos, ni garantiza la seguridad, exactitud de lo transmitido por este medio. Si por error ha recibido este E-mail, favor reenvíelo al remitente y borre el mensaje recibido inmediatamente
_______________________________________________
Quickfixn mailing list
Quickfixn at lists.quickfixn.com<mailto:Quickfixn at lists.quickfixn.com>
http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com

This email, along with any attachments, is confidential. If you believe you received this message in error, please contact the sender immediately and delete all copies of the message. Thank you from Connamara Systems, LLC.
Aviso de Confidencialidad: La información contenida en este E-mail es confidencial y sólo puede ser utilizada por el destinatario a quien está dirigido. Conforme artículo 318 del Código Civil y Comercial de la Nación, la correspondencia confidencial no puede ser utilizada sin consentimiento del remitente, y los terceros no pueden valerse de la correspondencia sin asentimiento del destinatario, y del remitente si es confidencial. Si no es el destinatario autorizado de este E-mail, no puede utilizar esta información sin consentimiento del remitente y cualquier retención, difusión, distribución o copia de este mensaje es prohibida y sancionada por la ley. Toda vez que la información remitida por este medio puede ser objeto de modificación o alteración, el emisor no se responsabiliza por errores u omisiones contenidos en este mensaje o sus anexos, ni garantiza la seguridad, exactitud de lo transmitido por este medio. Si por error ha recibido este E-mail, favor reenvíelo al remitente y borre el mensaje recibido inmediatamente
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20200303/7d56b028/attachment.htm>


More information about the Quickfixn mailing list