# Use advanced logging
> **Note:** The samples on this page are Java classes from the GroupDocs.Redaction for Java API. Use them from Node.js via Java by placing the classes on the JVM classpath, or by wrapping the same interfaces with `java.newProxy`.
You can implement *ILogger* interface from com.groupdocs.redaction.options package. This interface requires to implement three methods:
```java
import com.groupdocs.redaction.options.ILogger;
import java.util.ArrayList;
/**
*
* This is an example of ILogger implementation, tracking count of error messages.
*
*/
public class CustomLogger implements ILogger
{
private ArrayList _errors;
private ArrayList _traces;
private ArrayList _warnings;
public boolean hasErrors()
{
return _errors.size() > 0;
}
public CustomLogger()
{
_errors = new ArrayList();
_traces = new ArrayList();
_warnings = new ArrayList();
}
public void error(String message)
{
_errors.add(message);
}
public void trace(String message)
{
_traces.add(message);
}
public void warning(String message)
{
_warnings.add(message);
}
}
```
Once implemented, you can use it to track error log records:
```java
CustomLogger logger = new CustomLogger();
final Redactor redactor = new Redactor(Constants.SAMPLE_DOCX, new LoadOptions(), new RedactorSettings(logger));
try
{
// Here we can use document instance to perform redactions
redactor.apply(new DeleteAnnotationRedaction());
if (!logger.hasErrors())
{
redactor.save();
}
}
finally { redactor.close(); }
```