dlangui.core.logger

This module provides logging utilities.

Use Log class static methods.

Synopsis:

import dlangui.core.logger;

// setup:

// use stderror for logging
setStderrLogger();
// set log level
setLogLevel(LogLevel.Debug);

// usage:

// log debug message
Log.d("mouse clicked at ", x, ",", y);
// or with format string:
Log.fd("mouse clicked at %d,%d", x, y);
// log error message
Log.e("exception while reading file", e);
More...

Members

Classes

Log
class Log

Enums

LogLevel
enum LogLevel

Log levels

Functions

onResourceDestroyWhileShutdown
void onResourceDestroyWhileShutdown(string resourceName, string objname)
Undocumented in source. Be warned that the author may not have intended to support it.
setAppShuttingDownFlag
void setAppShuttingDownFlag()

for debug purposes - sets shutdown flag to log widgets not destroyed in time.

Properties

appShuttingDown
bool appShuttingDown [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
currentTimeMillis
long currentTimeMillis [@property getter]

Returns timestamp in milliseconds since 1970 UTC similar to Java System.currentTimeMillis()

Static variables

APP_IS_SHUTTING_DOWN
bool APP_IS_SHUTTING_DOWN;

set to true when exiting main - to detect destructor calls for resources by GC

Detailed Description

For Android, set log tag instead of setXXXLogger:

Log.setLogTag("myApp");

Meta

License

Boost License 1.0

Authors

Vadim Lopatin, coolreader.org@gmail.com