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
5
votes
1 answer

How to use logging mechanism efficiently?

I am using log4javascript to log and track the issues in my JavaScript code. I have seen similar logging aids before but I am having difficulty in understanding how each of these log levels should be used to be more useful and productive. Most of…
Anil Namde
  • 6,452
  • 11
  • 63
  • 100
5
votes
1 answer

How to angularjs write log to file?

I have a question? In Angularjs project, what log I can use to write to file? $log of Angular or log4javascript. I have code config for $log of Angularjs: $log.getInstance = function (context) { return { log:…
phuchoangmai
  • 305
  • 1
  • 5
  • 15
5
votes
3 answers

log object in log4javascript

I want to log objects using log4javascript. For example consider the following code: function LogObject() { var blah = { one: 42, two: "486" }; logger.Info(blah); Assuming that logger is instance of log4javascript logger that is properly…
seeker
  • 3,255
  • 7
  • 36
  • 68
4
votes
2 answers

Get the class function name within itself

I'm trying to setup logging across my typescript program, using log4javascript. However I have no idea how to retrieve the function names using reflection (rather than typed manually). Ideally I want to emulate what I do in C#: public class Foo { …
Tim
  • 2,968
  • 5
  • 29
  • 55
4
votes
1 answer

log4javascript - no trace messages appear

I'm using log4javascript version 1.4.3. In my app it works fine for all log levels except trace. To simplify things and make sure that the problem is not within my app I made an example using the authors sample code as an example and added a…
RoyHB
  • 1,715
  • 1
  • 22
  • 38
3
votes
2 answers

Logging in Reactjs

I am working on ReactJS for developing a client side of an application, there are very few options available for client side logging as compared to server side on of them which I came across is log4js it has appenders. But are there any other…
TGW
  • 805
  • 10
  • 27
3
votes
3 answers

Log4js: logs depend on NODE_ENV

How can I make logs (INFO, ERROR) dependent on set NODE_ENV? I mean, for example, if NODE_ENV=development, I write only ERROR logs. With NODE_ENV=production, there has to be only INFO. How should I modify appenders to perform this? Thanks for your…
a-a
  • 472
  • 2
  • 6
  • 20
3
votes
2 answers

Modify UI of Log4Javascript

I have log4javascript setup so that it displays a log as follows: However, I would like to get rid off some stuff, and instead would like the UI to be as below: How can this be done? I am using the InPageAppender
morpheus
  • 18,676
  • 24
  • 96
  • 159
3
votes
2 answers

How can I use a payload instead of form-data for log4javascript

I am bound to the restrictions of my webservice: It expects a json-payload! So, doing something like var ajaxAppender = new log4javascript.AjaxAppender("clientLogger"); var jsonLayout = new…
user57508
3
votes
1 answer

log4javascript web.config

I use log4net in my ASP.NET MVC sites, and want to start using a similar package in my JavaScript (such as log4javascript) to do logging there. Especially logging of exceptions, but also debug logging if a user reports that something went wrong but…
user1147862
  • 4,096
  • 8
  • 36
  • 53
2
votes
1 answer

log4javascript - obtain history of messages programmatically?

I'm looking into using a javascript logging framework in my app. I quite like the look of log4javascript (http://log4javascript.org/) but I have one requirement which I'm not sure that it satisfies. I need to be able to ask the framework for all…
dbruning
  • 5,042
  • 5
  • 34
  • 35
2
votes
1 answer

Is log4javascript vulnerable to Apache Log4j (Java logging library) remote code execution CVE-2021-44228?

Typescript is using log4javascript, is it the same as log4j? If yes, how can we keep our application secure?
Riya Ghosh
  • 57
  • 11
2
votes
1 answer

DefinitelyTyped log4javascript missing module declaration

I'm having a hard time using the following typings file in my project: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/log4javascript Apperantly, the file is missing a module declaration, causing typescript to complain that it can't…
Dirk S.
  • 67
  • 10
2
votes
1 answer

log4javascript IE8 unexpected error "Function attendue"/"Expected function"

I'm trying to redirect console calls to log4javascript library. So basically, any call to console.log will call log.info, log being a Log4javascript instance. But when it calls log.info I get a "Fonction attendue" error (French) which basically…
Vadorequest
  • 16,593
  • 24
  • 118
  • 215
2
votes
1 answer

Log4JavaScript server-side receiving

I'm trying to use Log4Javascript to send client-side errors to the server where results can then be written to file. I'm using the AjaxAppender to try to send the data to the server. I started with a simple "Hello world" to see if I can figure out…
Arik
  • 23
  • 1
  • 3
1
2 3 4