Hi Support,
What is "MaxLevel" for LogListener?
-žarko
ILogServer::SetListenerMaxLevel SOLVED
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
-
Vasyl - PDF-XChange
- Site Admin
- Posts: 2476
- Joined: Thu Jun 30, 2005 4:11 pm
Re: ILogServer::SetListenerMaxLevel
The prototypes:
ILogServer::RegisterListener(ILogListener* pListener, long nMaxLevel = -1);
or, to change level for already registered listener:
ILogServer::SetListenerMaxLevel(ILogListener* pListener, long nMaxLevel);
nMaxLevel - specifies the level of logging granularity you need, to get it via OnLogMsg callback. The bigger number means more details (negative_number == everything). For example, if you may want to receive errors only, without any warnings or infos - then just do this:
auxInst.LogServer.RegisterListener(myListener, LogMsgType.LogMsg_Error);
or, if you need more, then:
auxInst.LogServer.RegisterListener(myListener, LogMsgType.LogMsg_Warning); // errors and warnings
or
auxInst.LogServer.RegisterListener(myListener, LogMsgType.LogMsg_Info); // errors, warnings and infos
or
auxInst.LogServer.RegisterListener(myListener, LogMsgType.LogMsg_Verbose); // full details
HTH.
ILogServer::RegisterListener(ILogListener* pListener, long nMaxLevel = -1);
or, to change level for already registered listener:
ILogServer::SetListenerMaxLevel(ILogListener* pListener, long nMaxLevel);
nMaxLevel - specifies the level of logging granularity you need, to get it via OnLogMsg callback. The bigger number means more details (negative_number == everything). For example, if you may want to receive errors only, without any warnings or infos - then just do this:
auxInst.LogServer.RegisterListener(myListener, LogMsgType.LogMsg_Error);
or, if you need more, then:
auxInst.LogServer.RegisterListener(myListener, LogMsgType.LogMsg_Warning); // errors and warnings
or
auxInst.LogServer.RegisterListener(myListener, LogMsgType.LogMsg_Info); // errors, warnings and infos
or
auxInst.LogServer.RegisterListener(myListener, LogMsgType.LogMsg_Verbose); // full details
HTH.
PDF-XChange Co. LTD (Project Developer)
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
zarkogajic
- User
- Posts: 1527
- Joined: Thu Sep 05, 2019 12:35 pm
Re: ILogServer::SetListenerMaxLevel SOLVED
Hi Vasyl, thanks.
-ž
-ž
-
Stefan - PDF-XChange
- Site Admin
- Posts: 19930
- Joined: Mon Jan 12, 2009 8:07 am