This class provides logging functionality for the SDK's internal processes.
More...
This class provides logging functionality on different outputs like files or the standard output. Each log entry consists of a category, a log level and the logmessage.
This SDK allows to write logmessages with the category "APPLICATION" at different loglevels. The logger can be configured to log only messages up to a specified loglevel for a certain category.
Example:
Logging.configureLogCategory("APLICATION", 23);
Logging.configureLogCategory("API", 23);
Logging.configureLogCategory("CALLBACK", 23);
Logging.configureLogCategory("APIINIT", 23);
Logging.configureLogCategory("LICENCE", 23);
Logging.enableDebugLogging();
Logging.enableFileLogging(filename, 1024*1024*10 , 5, false);
◆ configureLogCategory()
| static native ApiError configureLogCategory |
( |
String |
category, |
|
|
int |
loglevel |
|
) |
| |
|
static |
Configures for a given category, the maximum loglevel that a message may have so that it is included in the logoutput.
- Parameters
-
| category | defines the category for which the loglevel is configured. |
| loglevel | user defined loglevels or Loglevel if wanted. |
- Returns
- Errorcode
◆ disableDebugLogging()
| static native ApiError disableDebugLogging |
( |
| ) |
|
|
static |
Disable debug logging functionality
- Returns
- Errorcode
◆ disableFileLogging()
| static native ApiError disableFileLogging |
( |
| ) |
|
|
static |
Disable logging functionality which writes to a file on disk.
- Returns
- Errorcode
◆ enableDebugLogging()
| static native ApiError enableDebugLogging |
( |
| ) |
|
|
static |
Enable debug logging functionality which generates log output in the standard output
- Returns
- Errorcode
◆ enableFileLogging()
| static native ApiError enableFileLogging |
( |
String |
filename, |
|
|
int |
maxSize, |
|
|
int |
maxFiles, |
|
|
boolean |
closeFileMode |
|
) |
| |
|
static |
Enable logging functionality which writes to one or multiple files on disk.
- Parameters
-
| filename | in which log data is stored. The name gets an automatic postfix, which is a 3 digit ascending index starting with 000 |
| maxSize | defines the maximum size of a logfile in bytes. If a new log entry would exceed maxSize of the current logfile, it will be written in the log file with the next higher index. |
| maxFiles | defines the maximum number of logfiles that shall be written. If a new log entry would exceed maxSize in the logfile with index maxFiles, logging will continue in the first file and overwrite it from the beginning. |
| closeFileMode | if true, the logfile will be closed after a new log entry is written |
- Returns
- Errorcode
◆ write()
| static native ApiError write |
( |
int |
loglevel, |
|
|
String |
msg |
|
) |
| |
|
static |
If the loglevel of the category "APPLICATION" (set with by Logging.configureLogCategory().) is < than the param loglevel, msg is written to the logoutput.
- Parameters
-
| loglevel | defines the level with which msg is written. |
| msg | defines the logmessage itself. |
- Returns
- Errorcode
◆ writeWithCategory()
| static native ApiError writeWithCategory |
( |
String |
category, |
|
|
int |
loglevel, |
|
|
String |
msg |
|
) |
| |
|
static |
If the loglevel of the category "APPLICATION" (set with by Logging.configureLogCategory().) is < than the param loglevel, msg is written to the logoutput.
- Parameters
-
| loglevel | defines the level with which msg is written. |
| msg | defines the logmessage itself. |
- Returns
- Errorcode
The documentation for this class was generated from the following file: