Hi Support,
What is "MaxLevel" for LogListener?
-žarko
ILogServer::SetListenerMaxLevel SOLVED
Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
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-Tracker Dev Team
- Site Admin
- Posts: 2352
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
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.
Vasyl Yaremyn
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 1370
- Joined: Thu Sep 05, 2019 12:35 pm
Re: ILogServer::SetListenerMaxLevel SOLVED
Hi Vasyl, thanks.
-ž
-ž
- Tracker Supp-Stefan
- Site Admin
- Posts: 17824
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact: