{"id":17597951,"url":"https://github.com/cvan/mirrormirror","last_synced_at":"2025-03-29T20:27:52.908Z","repository":{"id":11544424,"uuid":"14029649","full_name":"cvan/mirrormirror","owner":"cvan","description":"Send `console.log` logs to a simple server.","archived":false,"fork":false,"pushed_at":"2013-11-01T00:05:03.000Z","size":116,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T09:50:18.800Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cvan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-10-31T22:12:46.000Z","updated_at":"2013-11-01T20:40:57.000Z","dependencies_parsed_at":"2022-09-06T20:31:51.177Z","dependency_job_id":null,"html_url":"https://github.com/cvan/mirrormirror","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvan%2Fmirrormirror","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvan%2Fmirrormirror/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvan%2Fmirrormirror/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cvan%2Fmirrormirror/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cvan","download_url":"https://codeload.github.com/cvan/mirrormirror/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246240601,"owners_count":20745901,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-22T09:44:07.707Z","updated_at":"2025-03-29T20:27:52.862Z","avatar_url":"https://github.com/cvan.png","language":"JavaScript","readme":"mirrormirror\n============\nSend `console.log` logs to a simple server.\n\n\nInstallation\n------------\n* `npm install`\n* `nodemon app.js`\n\n\nUsage\n-----\n* `curl 'http://localhost:7000?message=Yolo`\n* Or from a `console.log` wrapper function in your JS:\n\n```javascript\nfunction log() {\n    // `console.log` wrapper that prefixes log statements.\n    var msg = Array.prototype.slice.call(arguments, 0).join(' ');\n    new Image().src = 'http://localhost:7000/log?msg=' + msg;\n    console.log(msg);\n}\n```\n* From [mozilla/fireplace](https://github.com/mozilla/fireplace):\n\n```diff\ndiff --git a/hearth/media/js/log.js b/hearth/media/js/log.js\nindex 8488dfa..4a92d98 100644\n--- a/hearth/media/js/log.js\n+++ b/hearth/media/js/log.js\n@@ -48,6 +48,9 @@ define('log', ['storage', 'utils'], function(storage, utils) {\n                 // TODO: Add colorification support here for browsers that support it.\n                 // *cough cough* not firefox *cough*\n\n+                var msg = Array.prototype.slice.call(args, 0).join(' ');\n+                new Image().src = 'http://localhost:7000/log?msg=' + msg;\n+\n                 console[log_level].apply(console, args);\n             };\n         }\ndiff --git a/yulelog/main.js b/yulelog/main.js\nindex 5c585ce..b50d5b8 100644\n--- a/yulelog/main.js\n+++ b/yulelog/main.js\n@@ -2,13 +2,15 @@\n\n     function log() {\n         // `console.log` wrapper that prefixes log statements.\n-        console.log('[yulelog]', Array.prototype.slice.call(arguments, 0).join(' '));\n+        var msg = Array.prototype.slice.call(arguments, 0).join(' ');\n+        new Image().src = 'http://localhost:7000/log?msg=' + msg;\n+        console.log('[yulelog]', msg);\n     }\n\n     // No trailing slash, please.\n     // Note: our Makefile swaps this out when you supply `DOMAIN`\n     // when running `make log`.\n-    var MKT_URL = 'https://marketplace.firefox.com';\n+    var MKT_URL = 'http://localhost:8675';\n     log('MKT_URL:', MKT_URL);\n\n     var activitiesToSend = [];\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcvan%2Fmirrormirror","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcvan%2Fmirrormirror","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcvan%2Fmirrormirror/lists"}