Questions tagged [log4javascript]

log4javascript is a JavaScript logging framework based on the Java logging framework log4j.

log4javascript is a JavaScript logging framework based on the Java logging framework log4j.

Not to be confused with , as it is an adaption of to .

50 questions
2
votes
3 answers

log4javascript - open the same PopUpAppender so all the log is in one log window

Can log4javascript reuse the same (the exact same) PopUpAppender ? What do I mean by that : once you start logging the PopUpAppender will create a new window (usually with an 'windowId' something like…
2
votes
1 answer

Cannot get log4javascript to work with an InPageAppender when using requirejs

If I use log4javascript without requirejs, everything (including in-page appenders) works as expected. When using requirejs, this works (a pop-up window appears with the warning): var log = log4javascript.getDefaultLogger(); log.warn("This is a test…
Jeff G
  • 1,996
  • 1
  • 13
  • 22
2
votes
1 answer

Override console.log (or any function in general): Is there a proper way to do this?

I find myself doing this quite often both on the browser and in node.js and it's about time I came up with a proper way to do this without debugging it for a while each time. Here's what I'm currently working on (this is node.js): var log4js =…
Steven Lu
  • 41,389
  • 58
  • 210
  • 364
1
vote
1 answer

.ASMX weirdness deserializing JSON blob from log4javascript logging?

I'm getting 'invalid JSON primitive' when i try to deserialize a JSON blob generated by log4javascript using the ajax appender with the json layout. I've written a web service method to recieve the JSON sent by log4javascript but the JSON is…
glaucon
  • 8,112
  • 9
  • 41
  • 63
1
vote
0 answers

Log4javascript - Log into a file using AjaxAppender in javascript (not node)

I am using log4javascript and I created an appender that logs my javascript code in the log4js console. I want to change it, and log everything into a file. I tried the examples I found online, but I couldn't actually find a valid way of writing the…
1
vote
1 answer

typescript unable to resolve type

I am trying to use log4javascript in a project and I see that the package does have log4javascript.d.ts present in node_modules/log4javascript/ and the package.json does refer to it in the "typings" property but when compiling my project it…
Divick
  • 1,213
  • 1
  • 20
  • 44
1
vote
1 answer

Unable to send client side log to server (Asp.net Web API) using log4javascript

Requirement: Add client side logging and send it to server. Devs in server should be able to enable or disable this logging functionality. My Approach: I have created a ASP.NET WebAPI project, where i have created a POST method to write log data to…
Indranil
  • 2,229
  • 2
  • 27
  • 40
1
vote
1 answer

Failing to override JS functions

I'm trying to override some functions from a lib called log4javascript. I tried the following: var _logFatal = log.fatal; var _logError = log.error; var _logWarn = log.warn; var _logDebug = log.debug; log.fatal =…
Vadorequest
  • 16,593
  • 24
  • 118
  • 215
1
vote
1 answer

log4javascript - Line no in logs messages

log4javascript prints line no of log4javascript js file. Log message.... log4javascript_uncompressed.js:1881 How to print the line no from which actual log is placed in log messages? Example: Log message.... app.js:15
Nitul
  • 997
  • 12
  • 35
1
vote
1 answer

req.body still empty in POSTs even with body-parser in node.js app (with CORS and HTTPS)

I'm trying to make a very basic node.js app using express, that takes browser event logs from log4javascript over CORS and HTTPS and that will write them to mongoDB. I'm stuck at trying to get the bodyParser to show the data. I've tried all sorts of…
hendrixski
  • 1,124
  • 1
  • 12
  • 20
1
vote
0 answers

log4js (node) cannot send via SMTP appender with no auth

I'm using a port of log4js designed for javascript in node and am having some trouble using the SMTP appender where the SMTP relay does not use authentication Here is my configuration: "appenders": [ { "type": "smtp", "recipients":…
bustedware
  • 194
  • 1
  • 3
  • 18
1
vote
1 answer

Log4JavaScript server-side coding

I'm trying to use Log4Javascript for logging logs from JavaScript to a file. I'm using the AjaxAppender to try to send the data to the server. But whenever i am trying to log the file specified in url field is empty url = "demo.log"; var…
Nik
  • 11
  • 3
1
vote
1 answer

log4javascript - Usage

I am developing an application using plain html (5) + css (3) + js (not using any framework). I run into the problem, JavaScript debugging. Searching led me to log4javascript. My Q is : From demo's its clear how to use in a given html page. So if my…
Ravi raj
  • 136
  • 1
  • 1
  • 7
1
vote
1 answer

Why log4javascript.trace method does not work?

From documentation I can see that there is such function but it does not work. Why? http://log4javascript.org/docs/quickstart.html I saw one bug about it, but it was marked as fixed, so I got latest version but bug is still in there.
Vitalii Korsakov
  • 45,737
  • 20
  • 72
  • 90
1
vote
1 answer

Add custom log level in log4javascript

I have added custom level in "log4javascript". Using below code, log4javascript.Level[strLevelName] = new log4javascript.Level(nLevelValue, strLevelName); Let say, i have added level "CUSTLEVEL" and its levelValue is 45000(between WARN &…
Parth
  • 527
  • 1
  • 8
  • 17