Class LoggingService
Singleton class giving access to logging features.
It supports custom domain, writing into a file as well as several verbosity
levels. The LinphoneLoggingServiceCbs listener allows you to be notified each
time a log is printed.
As the LoggingService is a
singleton, use
Inherited Members
Namespace: Linphone
Assembly: cs.temp.dll.dll
Syntax
public class LoggingService : LinphoneObject
Properties
CurrentCallbacks
Returns the current callbacks being called while iterating on callbacks.
Declaration
public LoggingServiceListener CurrentCallbacks { get; }
Property Value
Type | Description |
---|---|
LoggingServiceListener | A pointer to the current LinphoneLoggingServiceCbs object |
Domain
Get the domain where application logs are written (for example with
Declaration
public string Domain { get; set; }
Property Value
Type | Description |
---|---|
System.String | The domain where application logs are written. |
Instance
Gets the singleton logging service object.
The singleton is automatically instantiated if it hasn't been done yet.
Declaration
public static LoggingService Instance { get; }
Property Value
Type | Description |
---|---|
LoggingService | A pointer on the LoggingService singleton. |
Listener
Declaration
public LoggingServiceListener Listener { get; }
Property Value
Type | Description |
---|---|
LoggingServiceListener |
LogLevel
Set the verbosity of the log.
For instance, a level of Message will let pass fatal, error, warning and message-typed messages whereas trace and debug messages will be dumped out.
Declaration
public LogLevel LogLevel { set; }
Property Value
Type | Description |
---|---|
LogLevel |
LogLevelMask
Gets the log level mask.
Declaration
public uint LogLevelMask { get; set; }
Property Value
Type | Description |
---|---|
System.UInt32 | the log level mask |
Methods
Debug(String)
Write a LinphoneLogLevelDebug message to the logs.
Declaration
public void Debug(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The log message. |
Error(String)
Write a LinphoneLogLevelError message to the logs.
Declaration
public void Error(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The log message. |
Fatal(String)
Write a LinphoneLogLevelFatal message to the logs.
Declaration
public void Fatal(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The log message. |
Finalize()
Declaration
protected void Finalize()
Message(String)
Write a LinphoneLogLevelMessage message to the logs.
Declaration
public void Message(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The log message. |
SetLogFile(String, String, Int64)
Enables logging in a file.
That function enables an internal log handler that writes log messages in log-rotated files.
Declaration
public void SetLogFile(string dir, string filename, long maxSize)
Parameters
Type | Name | Description |
---|---|---|
System.String | dir | Directory where to create the distinct parts of the log. |
System.String | filename | Name of the log file. |
System.Int64 | maxSize | The maximal size of each part of the log. The log rotating is triggered each time the currently opened log part reach that limit. |
Trace(String)
Write a LinphoneLogLevelTrace message to the logs.
Declaration
public void Trace(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The log message. |
Warning(String)
Write a LinphoneLogLevelWarning message to the logs.
Declaration
public void Warning(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The log message. |