#1 2019-11-12 07:07:01

MikaK
Member
Registered: 2016-11-09
Posts: 14

Log every connection temporary

Hi,
Is it possible to log every connection (urls) made to server to support developer team in problems.
I have rest server running. url:port/api and if I try for example wget url:port/ap/something i only see that connection is tried but not what url it was.

Thanks
mika

Last edited by MikaK (2019-11-12 07:11:23)

Offline

#2 2019-11-12 13:29:54

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,658
Website

Re: Log every connection temporary

It is supported out-of-the box is you enable the mORMot logging.

Online

#3 2019-11-12 16:34:46

MikaK
Member
Registered: 2016-11-09
Posts: 14

Re: Log every connection temporary

Intresting,
I have enabled logging
  with TSQLLog.Family do
    Level := LOG_VERBOSE;
And my public server is created (also interface based server in same app)
  lPubserver := TPublicServer.CreateWithOwnModel( [ ], false, 'api' );
  HTTPServer := TSQLHttpServer.Create( PORT_NAME, [ lInterfacebasedServer, lPubserver], '+', useBidirSocket );
  HTTPServer.WebSocketsEnable( Server, Taustapalvelukey ).Settings.SetFullLog;


I make a call wget http://127.0.0.1:5854/foo  and in log I have
20191112 16235513 info  SetThreadName 20a4=TSQLHttpServer 5854/root api TWebSocketServerRest
20191112 16235513 trace mORMot.TSQLRestServerFullMemory(09acdb70) BeginCurrentThread(TWebSocketServerRest) root=root ThreadID=20a4 ThreadCount=1
20191112 16235513 trace taustapalveluInit.TPublicServer(09acdf90) BeginCurrentThread(TWebSocketServerRest) root=api ThreadID=20a4 ThreadCount=1
20191112 16235513  -    00.004.601

Offline

Board footer

Powered by FluxBB