Giter VIP home page Giter VIP logo

consoleexport's People

Contributors

janodvarko avatar ptrstpp950 avatar sebastianz avatar waseemh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

consoleexport's Issues

FirefoxDeveloperEdition

I appreciate this add-on!

It works well in Firefox, but then Mozilla got all elegant and stuff.... So, the add-on does not work on FirefoxDeveloperEdition. I hope you get it there, and make it an institution!

Thanks for this!!!!!!
D

changed consoleExport-0.5b5.xpi so that logging parameters are sent to logging server URL

consoleListener.js
Added
var logJSONText = JSON.stringify(object, null);
and
msg: logJSONText,
This sends the logging line with all the parameters in the logging line to the server url.
Previously the logging line came with its text only and without and parameters in the text line.
Can you please make a new improved version of consoleExporter with these changes?
Thanks.
Regards,
Babygiraffe.

/* See license.txt for terms of usage */

FBL.ns(function() { with (FBL) {

// ************************************************************************************************
// Constants

const Cc = Components.classes;
const Ci = Components.interfaces;

// ************************************************************************************************
// Module implementation

/**

  • This object represents Console panel listener that listens for Console panel logs

  • and uses {@link Firebug.ConsoleExport.Uploader} to upload them to a specified server.
    /
    Firebug.ConsoleExport.Listener =
    /
    * @Lends Firebug.ConsoleExport.Listener */
    {
    registered: false,

    register: function()
    {
    if (!this.registered)
    {
    Firebug.Console.addListener(this);
    Firebug.Profiler.addListener(this);
    }
    },

    unregister: function()
    {
    if (this.registered)
    {
    Firebug.Console.removeListener(this);
    Firebug.Profiler.removeListener(this);
    }
    },

    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
    // Console listener

    log: function(context, object, className, sourceLink)
    {
    object = unwrapObject(object);
    var logJSONText = JSON.stringify(object, null);
    if (FBTrace.DBG_CONSOLEEXPORT)
    FBTrace.sysout("consoleexport.Console.Listener.log; " +
    className, object);

    try
    {
        Firebug.ConsoleExport.Uploader.send({
            className: className,
            cat: object.category,
            msg: logJSONText,
            href: object.href ? object.href : context.getName(),
            lineNo: object.lineNo,
            source: object.source,
        });
    }
    catch (err)
    {
        if (FBTrace.DBG_CONSOLEEXPORT || FBTrace.DBG_ERRORS)
            FBTrace.sysout("consoleexport.Console.Listener.log; EXCEPTION " + err, err);
    }
    

    },

    logFormatted: function(context, objects, className, sourceLink)
    {
    objects = unwrapObject(objects);
    var logJSONText = JSON.stringify(objects, null);
    if (FBTrace.DBG_CONSOLEEXPORT)
    FBTrace.sysout("consoleexport.Console.Listener.logFormatted; " +
    className, objects[0]);

    Firebug.ConsoleExport.Uploader.send({
        className: className,
        cat: "log",
        msg: logJSONText,
        href: context.getName(),
    });
    

    },

    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
    // Firebug Profiler listener

    startProfiling: function(context, title)
    {
    if (FBTrace.DBG_CONSOLEEXPORT)
    FBTrace.sysout("consoleexport.Console.Listener.startProfiling; " + title);

    // TODO: send to the server
    

    },

    stopProfiling: function(context, title, results, canceled)
    {
    if (FBTrace.DBG_CONSOLEEXPORT)
    FBTrace.sysout("consoleexport.Console.Listener.stopProfiling; " + title +
    (canceled ? " (canceled)" : ""), results);

    // TODO: send to the server
    

    },
    };

// ************************************************************************************************
}});

Allow to specify only the path instead for export to file system

The preference extensions.firebug.consoleexport.logFilePath added in 22bddbd allows to specify a file, to which the data is exported automatically.

Though as mentioned in Google Code issue 5182 comment 22 it would be nice if you could just specify the path and the file name would be automatically generated using the page's domain name like NetExport does it.

This allows to save your output separately for each page you visit.

The implementation could offer both functionalities. I.e. if a full file path is specified, the data is saved to that file, always overwriting it. If a directory path is specified, the file name is dynamically generated using the domain name.

Sebastian

Create new release

As issue #9 got implemented some time ago, which seems to be the most-wanted feature for ConsoleExport, and the last release 0.5b5 was done more than a year ago, a new release should be made.

Sebastian

Import?

Could you modify this so that a file is read from the local file system then written to the console window?

Pass URL in console export packets

Hi,

Can you please pass URL in each packet sent to server so that it becomes easy to link error with the page on which it occurred.

Thanks,
Ketan

Addon needs to be signed

https://wiki.mozilla.org/Addons/Extension_Signing
Firefox 40: Firefox warns about signatures but doesn't enforce them.
Firefox 41: Firefox will have a preference that allows signature enforcement to be disabled (xpinstall.signatures.required in about:config).
Firefox 42: Release and Beta versions of Firefox will not allow unsigned extensions to be installed, with no override.

Auto export sends empty strings

Hello, I'm using plugin with php linux service as server, but receives only empty strings. How I can trace sended errors? I'm using wireshark for this purposes, but it gives no effect during filtering tcp ip traffic.

consoleexport 0.5b5
firefox 15.0.1 on linux
php-cli as linux service

Add possibility to auto-export the output to the file system

I needed to use consoleexport with automated selenium/webdriver tests and wanted it to write the logs to a file (in append mode), but do it automatically (like it does when sending to the specified upload server) instead of when clicking 'save as'.
Here you can find my solution as a patch to apply with consoleExport-0.5b5 http://code.google.com/p/fbug/issues/detail?id=5182#c17

Hope anybody finds it useful :)

PS. Remember, that to make it work with selenium tests, you need to add it to your profile along with Firebug, and then set the console tab open by default (otherwise it's inactive and no logs are written).

ConsoleExport 0.6b1 - autoexport log not working

Hi
in version 0.5b6 with firefox 36 autoexport log work perfectly, but in new version (0.6b1) doesn't work at all neither with firefox 36 nor with firefox 55. How I'm using this plugin:
profile.setPreference("extensions.firebug.consoleexport.active", true);
profile.setPreference("extensions.firebug.consoleexport.defaultLogDir", FIREBUG_LOG_PATH);
profile.setPreference("extensions.firebug.consoleexport.logFilePath", firebugLogFileName);

Firefox version 55
Selenium 3.6
Firebug 2.0.19
Java 8

If is posible add function to conver all object to array?

I got a lot [object Object],[object Object],[object Object],[object Object] in log on server.

I try some thing to use JSON.stringify but I have Circular reference problem so I write some code like this, maybe you can add to this addon if you like :)

This code maybe need to rewite to work better

var products = [
   {id:102, price:200.3}, 
   {id:3, price:104.5},
   {id:10, price:20},
   [
       {id:102, price:200.3}, 
       {id:3, price:104.5},
       {id:10, price:20},
       [
           {id:102, price:200.3}, 
           {id:3, price:104.5},
           {id:10, price:20},
       ]
   ]
];

function convert2array(obj, properties, deep, maxdeep) {
    ++deep;
    for(var key in obj) {
        if(obj.hasOwnProperty(key) && typeof obj[key] !== 'function') {
            if (deep < maxdeep) { 
                if (obj[key] != null && typeof obj[key]  === "object") {
                    if (obj[key].length > 0) {
                        properties[key] = [];
                        convert2array(obj[key], properties[key], deep, maxdeep);
                    }
                } else if (typeof obj[key]  === "number" || typeof obj[key]  === "string" || typeof obj[key]  === "boolean") {
                    properties.push(key + ': ' + obj[key]);
                } else {
//                    console.log('error: ' + key, obj[key]);
                }
            }
        }
    }

    return properties;
}

var cache = [];
var properties = [];
JSON.stringify(products, function(key, value) {
    if (typeof value === 'object' && value !== null) {
        if (cache.indexOf(value) !== -1) {
            // Circular reference found, discard key
            return;
        }
        if (typeof value  === "object" && value != null) {
            var res = convert2array(value, properties, -1, 4);
            properties.push(key + ': ' + res);
            cache.push(value);
        } else if (typeof value  === "number" || typeof value  === "string") {
            properties.push(key + ': ' + value);
            cache.push(value);
        }
    }
    return value;
});

console.log(properties);

does not work fully

latest ff today, latest firebug today.

Does not work for Net which is really the only one usefull to export. Only css which is already a possibility and java so you should advertise it for java only because that is all it adds. Waste of time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.