Pass: 0

Logging

…to the console

Simple logging

Log
You can seed your own logging messages in your unminified code to the console like this:

lg("My message");

In order to enable simple logging, set verbosity higher than 0…

6 thoughts on “Logging”

  1. Hello, I hope this message finds you well. Firstly, I would like to express my gratitude for the excellent functionality provided by your JavaScript plugin. It has proven to be a valuable asset in my projects.

    I am currently utilizing the plugin for AJAX requests within my web application. Specifically, I have a requirement where I need to redirect to another page upon successful completion of an AJAX request, without refreshing the entire page. I understand that typically, redirection in such scenarios is achieved by clicking an anchor tag, but I am keen to explore if there’s a way to accomplish this seamlessly using the Ajaxify plugin.

    Below is a snippet of the code I’m working with:

    let ajax = $.ajax({
    url: ‘/verify’,
    method: ‘post’,
    data: formData,
    dataType: ‘json’,
    beforeSend: function() {
    // Any pre-request actions can be included here
    }
    });

    ajax.done(function(response) {
    // Here, I aim to implement a redirection without refreshing the page
    // Ideally, I’d like to leverage the Ajaxify functionality for this purpose
    });

    ajax.fail(function(xhr, status, error) {
    console.log(“Request failed: ” + error);
    });

    I would greatly appreciate any guidance or insights you can provide on achieving this redirection seamlessly within the context of AJAX requests using the Ajaxify plugin.

    Thank you very much for your time and assistance.

    1. Hi there,

      thanks for using Ajaxify and I’m glad that you like it 🙂
      Thanks as well for elaborating on your use case.

      I believe this might come in handy for you – please see the interface page for further details:

      Jump to an internal page programmatically:
      ajaxify.pronto(0, URL);
      e.g.

      Also, if you’re facing some kind of timing problems, please consider using the Pronto events – most notably:

      • pronto.render

      Thanks again for your very friendly enquiry and please let me know, whether you need any more information/support…

      Cheers, Arvind

      1. Hello Arvind,

        Thank you so much for your prompt and helpful response! I truly appreciate your guidance on utilizing Ajaxify for my specific requirement. The code snippet and the pointers you provided seem like they will address my needs perfectly.

        I’ll definitely explore the interface page for more detailed information, and I’ll keep the Pronto events in mind to tackle any timing issues that may arise during implementation.

        Your assistance has been invaluable, and I couldn’t be more grateful for your support. If I encounter any further questions or require additional support, I’ll be sure to reach out.

        Thanks once again for your fantastic plugin and your willingness to help!

        Best regards,
        Onebuyu

        1. Hi Onebuyu,

          Thanks as well for your overwhelmingly positive feedback.
          You’re very welcome and please let me know, if you have some loose ends that need to be tied-up…

          Regards,
          Arvind

  2. In order to enable simple logging, set verbosity higher than 0….

    Hey there, I came across this when googling a kind of weird jquery line and anyways crazy where things lead you sometimes cause I had no intentions of looking for a jquery plugin, but after reading some of your comments it lead me to this url and suddenly I became intrigued.

    I have a bunch of questions that I imagine are likely already answered somewhere on this site hahaha so I’ll explore more before I fusillade you, but 1 I couldn’t find an answer to was the logging thing? So you said to enable simply logging set verbosity greating then 0, but are you suggesting your plugin has some unique preset values that’d effect to the logging one would get displayed? Lol I feel like I’m asking a stupid question but I’m just curious if your suggesting certain values to verbosity with the plugin given unique logging outputs?

    1. Thanks and I’ll get back to you asap…

      But to cut a long story short:

      Yes, you can use “verbosity” to setup different debugging levels.

Leave a Reply to admin Cancel reply

Your email address will not be published. Required fields are marked *

Show Buttons
Hide Buttons