The CLogDto class is used to store the data of a LOG entry.


There is only one constructor.

public CLogDto(@NotNull final ELevel aLevel,
               @Nullable final Class<?> aClass,
               @Nullable final String aName);

Getter and setter

The LOG level indicates how important this LOG entry is.

public ELevel getLevel();

The logger ID can consist of any class or text. In case of a class, its full name (including package) is used as ID.

public String getName();
public Class<?> getLoggerClass();
public String getLoggerName();

The message is the text that was given during logging. This text is not yet the final formatted text.

public String getMessage();
public void setMessage(@NotNull final String aMessage);

If the formatted text is already available, it can be fetched here.

public String getFormattedText();
public void setFormattedText(@NotNull final String aFormattedText);

The arguments, which are given during logging, are accessible here.

public Object[] getArguments();
public void setArguments(@Nullable final Object[] aArguments);

The supplier is a lambda that returns a completed LOG text or a set of objects. It is only called when the respective logger is actually called for logging (lazy logging).

public Supplier<?> getSupplier();
public void setSupplier(@Nullable final Supplier<?> aSupplier);

The properties can contain context specific information, which should not be provided individually each time logging takes place. LOG writers can process and display this information.

public Properties getProperties();
public void setProperties(@Nullable final Properties aProperties);

Exceptions can be passed when logging errors. Writer can output these as a stack trace.

public Throwable getThrowable();
public void setThrowable(@Nullable final Throwable aThrowable);

The location in the code where logging occurred can also be part of the LOG entry. The boolean native method returns true if the method containing the execution point is a native method.

public String getFileWhereLogged();
public void setFileWhereLogged(@Nullable final String aFileWhereLogged);
public int getLineWhereLogged();
public void setLineWhereLogged(final int aLineWhereLogged);
public String getClassWhereLogged();
public void setClassWhereLogged(@Nullable final String aClassWhereLogged);
public String getMethodWhereLogged();
public void setMethodWhereLogged(final String aMethodWhereLogged);
public boolean isNativeMethod();
public void setNativeMethod(final boolean aNativeMethod);

The thread information for the location where logging occurred is also included.

public String getThreadName();
public void setThreadName(@Nullable final String aThreadName);
public long getThreadId();
public void setThreadId(final long aThreadId);
public int getThreadPriority();
public void setThreadPriority(final int aThreadPriority);

There is a timestamp at which this LOG was generated.

public LocalDateTime getTimeStamp();
public void setTimeStamp(@NotNull final LocalDateTime aTimeStamp); - Innovative Distributed System