Link
Skip to main content

How to get JPedal log file and log activity?

This can be done by adding the following lines of code to your application using JPedal.

//Output log information to console
LogWriter.setupLogFile("v");

//Specify file to store log information added to console
LogWriter.log_name =  "log.txt";

JPedal does not include any dependencies on Logger or any other Logging framework, but it does provide a mechanism to pass messages through or handle yourself. You can do so by adding a LogScanner to the LogWriter.

This could be used to implement custom functionality such as adding popup dialogs for certain error messages or allowing you to custom functionality for different types of message.

//Specify file to store log information added to console
LogWriter.logScanner = message -> {
    if (message != null && message.startsWith("[MEMORY]")) {
        //Implement you own custom functionality for this message
        //Or call Logger. or other logging framework.
    }
};

Get started with JPedal in 3 steps

  1. Fill in the form to download the trial jar →
  2. Copy the code snippets as instructed on the next page
  3. Build your solution using our docs

Learn more about JPedal

Start Your Free Trial


Customer Downloads

Select Download