cancel
Showing results for 
Search instead for 
Did you mean: 

isa websale loggin

Former Member
0 Kudos

Hello everyone,

In isa application I need to create a separate log file. In log-config.properties file I've added following lines:

<i>com.moeller.isa.action.stats.severity = <b>INFO</b>

com.moeller.isa.action.stats.logs = +log[z_stat]

[..]

log[z_stat] = FileLog

log[z_stat].pattern = %[isa:path]/z_stat.log

log[z_stat].formatter = formatter[plain]</i>

plain formatter is %m (only message)

and in a class

<i>...

z_log.info("text");

...</i>

Like this the log file is not created.

I've change the severity to ERROR

<i>com.moeller.isa.action.stats.severity = <b>ERROR</b></i>

in class

<i><b>log.error("text");</b>

</i>

and like this is working.

<b>My problem : from where to configure the logging mechanism

to display logs for INFO level, but only for my logger?</b>

When is set to ERROR, some extra text is added in log file

<u>[(websale1_IAS_00)ID0932689950DB11599621683610643310End|text ] ???en.text ??? </u>

I need only my text to be in log file, and I think if is set to INFO level the aditional text is not dispalyed.

Thank you and a nice day

Bogdan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Bogdan,

You need to update your ISA application resource properties file to show the error in the error logs. The log.error ("abcd") is such that abcd is the key in ISAResource.properties file and there should be a corresponding text to it.

Regards,

Vivek

Former Member
0 Kudos

Hi,

I'm not sure if Vivek is correct when saying "abcd" is the key from the resource bundles... Whenever I've used the logging functionality I just get the text passed straight to my log file. For example:-

To enable debugging in one of my custom class' -

// set up logging
IsaLocation myLog = IsaLocation.getInstance(Z_AddSVGItemsAction.class.getName());

Then I pass a message to my logfile -

myLog.debug("Entered to Z_AddSVGItemsAction");/code]
Note: in my log config I have my logging set to debug level, hence I use log.debug();

If you have your log set to info then you should use the log.info(); method to pass messages.

The idea is that you add log messages through out your code of varying levels of detail and then you can change what is logged by simply changing the log file config to move it to a different level, like INFO or DEBUG.

You can also help with performance in your application by doing something like
[code]
if (myLog.isDebugEnabled())
myLog.debug("Some message");

or


if (myLog.isInfoEnabled())
myLog.info("Another message");

Hope that helps,

Gareth Ryan.

Answers (0)