console log

38 views
Skip to first unread message

Naveen Rajamannar

unread,
Mar 17, 2023, 1:13:40 AM3/17/23
to OWASP ZAP User Group
Hi I have written the following stand alone script


// Import Logger
var LoggerManager = Java.type("org.apache.logging.log4j.LogManager");
var log = LoggerManager.getLogger("SSTI");



log.debug("-------------------HELLO-----------------------")
log.info("----------------------INFO-----------------------")
log.error("----------------------Error----------------------")

But these are not appearing in the console, how do I output logs

Thanks,

Naveen Rajamannar

unread,
Mar 17, 2023, 1:41:25 AM3/17/23
to zaprox...@googlegroups.com
By console I mean. Terminal or command line 

--
You received this message because you are subscribed to the Google Groups "OWASP ZAP User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zaproxy-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zaproxy-users/0d8ffa49-5a52-450a-84f5-f265ef4e1ad6n%40googlegroups.com.

thc...@gmail.com

unread,
Mar 17, 2023, 3:36:02 AM3/17/23
to zaprox...@googlegroups.com
Hi.

How is ZAP being started? If with -cmd that's expected.

(You can configure a console appender for that logger though.)

Best regards.

nvn dnt

unread,
Mar 17, 2023, 3:43:19 AM3/17/23
to zaprox...@googlegroups.com
Hi, it is used with -cmd. Is there any way to get my logs into console?

--
You received this message because you are subscribed to the Google Groups "OWASP ZAP User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zaproxy-user...@googlegroups.com.

thc...@gmail.com

unread,
Mar 17, 2023, 10:57:16 AM3/17/23
to zaprox...@googlegroups.com
Yes, see:
https://logging.apache.org/log4j/2.x/manual/customconfig.html#Reconfigure_Log4j_Using_ConfigurationBuilder_with_the_Configurator

Note that if you want it to go just to the console you can use `print`
instead (or even `System.out.print(…)` if you want to do that in all ZAP
modes).

Best regards.
Reply all
Reply to author
Forward
0 new messages